Jump to content

SIP URI


shopcomputer

Recommended Posts

How do I set a dial plan for SIP URI, I want sip uri routed directly to its destination, rather than forward to the ITSP.

 

Just create a trunk which is only used for outbound direction and don't set the outbound proxy. Then in the replacement part of the dial plan you can put the URI as you wish. The PBX will follow the RFC3263 rules for routing the request.

Link to comment
Share on other sites

  • 1 year later...

Hi all!

 

pbx newbie here. I can't find out how to get a SIP URI through Snom One without getting changed.

 

Dial plan seems to have been built without the accomodation for SIP dialing to be done through it?

Please see http://macnugget.org/projects/asterisk/page7

 

My current dial plan (to keep thing simple) is: Pattern: * , Replacement: empty

Guess I'm after the same thing as shopcomputer?

Link to comment
Share on other sites

Did you also assign the dial plan to the domain and/or to the extension?

 

Yes, I've tried both. Can't figure out how to build a dial plan that doesn't modify the SIP URI (info@intertex.se) dialed. It works fine for calling ordinary phone numbers with the simplest dial plan (pattern: *, replacement: empty). Calling i.e. 90510 gets converted to sip:90510@sip1.netatonce.net;user=phone which is fine.

 

However, a complete SIP URI i.e. 9902@qxip.net doesn't work cause the dial plan changes it to sip:9902@sip1.netatonce.net;user=phone (argh!). It replaces the domain (qxip.net) with the domain name of the SIP Registration Trunk (Generic SIP Server) of my broadband supplier and ITSP, Netatonce. Calling info@intertex.se doesn't work at all (SIP/2.0 404 Not Found) with the simple dial plan as above. Note: sip:info@intertex.se is not in use anymore.

 

I've tried |^([a-zA-Z0-9&=+\$,;?\-_.!~*‘()%]+@.+)|sip:\1| which gives nothing, unless I remove the "!" in the string. Then I get sip:info@intertex.se@sip1.netatonce.net;user=phone when all I want is info@intertex.se. If I register a Snom 320 directly on my ITSP's SIP server (sip1.netatonce.net) both phone numbers (routed to PSTN) and SIP URI's i.e. info@intertex.se works. Confused... :)

 

I would appreciate some, down to earth, guidance on how to build a simple dial plan that adds "@domain;user=phone" when a phone number is dialed but doesn't modify a complete SIP URI (an address containing the_@_sign). My country code is 46 (Sweden) and area code 40 (Malmoe). Thanks in advance... have a great day!

 

 

Update: After some testing my current, SIP URI capable, dial plan looks like this. Cool, because now recording works when calling a SIP URI ;)

 

10;Netatonce;;112;

20;Netatonce;;^([0-9]{5,});

30;Netatonce;;"^([a-zA-Z0-9&=+\$,;?\-_.~*‘()%]+@.+)";sip:\1 (sip:\1 is the replacement)

90;Netatonce;;*;

 

Not bulletproof, but it works if the SIP URI doesn't start with more than four digits. Hoping that someone can improve pos. 20 in the dial plan or better the whole piece while you're at it. :)

Link to comment
Share on other sites

I'm very impressed with Snom One after 2 weeks of newbie testing. Maybe I'm using it in a way not intended i.e. for phone numbers and SIP URI's alike.

 

Unfortunately there's an inbound problem. Trunk replaces the callers domain name with my domain name when someone calls my SIP address!?

So, if bill@microsoft.com call myname@mydomain.dyndns.org then my Snom phone will show Missed Calls from bill@mydomain.dyndns.org.

Please look at the From: "Bill Gates" headers below, in the Snom One Logfile, how the domain name changes. Most grateful if someone can remedy that.

 

[7] 2011/10/28 09:08:21: SIP Rx udp:80.190.40.50:5060:

INVITE sip:myname@mydomain.dyndns.org SIP/2.0

Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK77e68e782c52808d24a5a5c3d2f3b6b0.0

Via: SIP/2.0/UDP 192.168.50.31:42389;branch=z9hG4bKPjyWhrtEnPZ6IG0HUIqZ8D1J8PzgHTbdru;received=192.168.50.31;rport=42389

Max-Forwards: 69

From: "Bill Gates" <sip:bill@microsoft.com>;tag=34TnZZHGX6oQ7AsqzyNWGULE4YA.On6k

To: sip:myname@mydomain.dyndns.org

Contact: "Bill Gates" <sip:bill@192.168.50.31:42682>

Call-ID: CIcZ.2iuSBYi3HrQGkfqKRH6eS2UNpCU

CSeq: 14713 INVITE

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Supported: replaces, 100rel, timer, norefersub

Session-Expires: 1800

Min-SE: 90

User-Agent: Bria Android 1.1.8

Content-Type: application/sdp

Content-Length: 253

Record-Route: <sip:25c260081bdf382f@192.168.0.1;lr=true>

 

v=0

o=- 3528781776 3528781776 IN IP4 192.168.50.31

s=cpc_med

c=IN IP4 192.168.50.31

t=0 0

m=audio 4000 RTP/AVP 18 0 96

a=rtpmap:18 G729/8000

a=fmtp:18 annexb=no

a=rtpmap:0 PCMU/8000

a=sendrecv

a=rtpmap:96 telephone-event/8000

a=fmtp:96 0-15

[5] 2011/10/28 09:08:21: Identify trunk (IP address and DID match) 2

[7] 2011/10/28 09:08:21: SIP Tx udp:80.190.40.50:5060:

SIP/2.0 100 Trying

Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK77e68e782c52808d24a5a5c3d2f3b6b0.0;rport=5060;received=80.190.40.50

Via: SIP/2.0/UDP 192.168.50.31:42389;branch=z9hG4bKPjyWhrtEnPZ6IG0HUIqZ8D1J8PzgHTbdru;received=192.168.50.31;rport=42389

Record-Route: <sip:25c260081bdf382f@192.168.0.1;lr=true>

From: "Bill Gates" <sip:bill@microsoft.com>;tag=34TnZZHGX6oQ7AsqzyNWGULE4YA.On6k

To: <sip:myname@mydomain.dyndns.org>;tag=68a86c6fa8

Call-ID: CIcZ.2iuSBYi3HrQGkfqKRH6eS2UNpCU

CSeq: 14713 INVITE

Content-Length: 0

 

[6] 2011/10/28 09:08:21: Sending RTP for CIcZ.2iuSBYi3HrQGkfqKRH6eS2UNpCU to 192.168.50.31:4000, codec not set yet

[5] 2011/10/28 09:08:21: Domain trunk Netatonce@mydomain.dyndns.org sends call to 41 in domain mydomain.dyndns.org

[7] 2011/10/28 09:08:21: set_codecs: for CIcZ.2iuSBYi3HrQGkfqKRH6eS2UNpCU codecs "", codec_preference count 6

[7] 2011/10/28 09:08:21: set_codecs: for 426603d7@pbx codecs "", codec_preference count 6

[7] 2011/10/28 09:08:21: SIP Tx udp:192.168.0.31:2098:

INVITE sip:41@192.168.0.31:2098;line=bcxudu4l SIP/2.0

Via: SIP/2.0/UDP 192.168.0.33:5060;branch=z9hG4bK-abecbe0e54d289877a733a0385aecd02;rport

From: "Bill Gates" <sip:bill@mydomain.dyndns.org;user=phone>;tag=27972

To: "My Name" <sip:41@mydomain.dyndns.org>

Call-ID: 426603d7@pbx

CSeq: 3786 INVITE

Max-Forwards: 70

Contact: <sip:41@192.168.0.33:5060;transport=udp>

Supported: 100rel, replaces, norefersub

Allow-Events: refer

Allow: INVITE, ACK, CANCEL, BYE, REFER, PRACK, INFO, UPDATE

Accept: application/sdp

User-Agent: snom-PBX/2011-4.2.1.4025

Alert-Info: <http://127.0.0.1/Bellcore-dr3>

Content-Type: application/sdp

Content-Length: 325

 

v=0

o=- 5619 5619 IN IP4 192.168.0.33

s=-

c=IN IP4 192.168.0.33

t=0 0

m=audio 57346 RTP/AVP 0 8 9 2 3 101

a=rtpmap:0 pcmu/8000

a=rtpmap:8 pcma/8000

a=rtpmap:9 g722/8000

a=rtpmap:2 g726-32/8000

a=rtpmap:3 gsm/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=rtcp-xr:rcvr-rtt=all voip-metrics

a=sendrecv

[7] 2011/10/28 09:08:21: SIP Rx udp:192.168.0.31:2098:

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.0.33:5060;branch=z9hG4bK-abecbe0e54d289877a733a0385aecd02;rport=5060

From: "Bill Gates" <sip:bill@mydomain.dyndns.org;user=phone>;tag=27972

To: "My Name" <sip:41@mydomain.dyndns.org>;tag=olrnw5vfg5

Call-ID: 426603d7@pbx

CSeq: 3786 INVITE

Contact: <sip:41@192.168.0.31:2098;line=bcxudu4l>;reg-id=1

Require: 100rel

RSeq: 1

Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE

Allow-Events: talk, hold, refer, call-info

Content-Length: 0

Link to comment
Share on other sites

The original design was respecting the URI; the orignal rule was: if there was a user=phone in the URI, then the PBX would change the URI and replace the domain. However, dealing with the reality in the SIP trunking market, we gave a little bit up on that for now and assume that all calls practically come from the "PSTN" or at least from a virtual PSTN. So far we have not seens any practical uses where the URI domain name was really relevant.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...