SIP Header modification..! + Incoming dial plan!

Dear All,

Athought I’ve made a great research I couldn’t find any helpful infomation regarding how to modify the sip header. The problem I am facing is the following: Although I can register to the sip server whenever I am placing a call, I get the following sip header:

INVITE sip:@ SIP/2.0
Via: SIP/2.0/UDP 192.168.10.2:5060;branch=z9hG4bK2350684e;rport
Max-Forwards: 70
From: “1000” <sip:@[size=150]@192.168.10.2[/size]>;tag=as5b167c1b
To: sip:telconumber@
Contact: sip:telconumber@[size=150]@192.168.10.2[/size]>
Call-ID: 62234e8b778742a36a3f597b05c8ffed@192.168.10.2
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.11
Date: Tue, 07 Jun 2011 16:03:12 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 260

What I really need is to supress @192.168.10.2 (which is the internal LAN address of the asterisk) in order to pass the call over the SIP provider. Any suggestions is appreciated.

Additionally, I can not receive calls and I am getting the 403 code.

Thank you for our support and for reading. :mrgreen:

You have NAT misonfigured. In particular, look at the externhost and externip settings in sip.conf, but also make sure that localnet is correct.

You may have other NAT configuration issues.

david55,

Thank you for your reply. Unfortunately I didn’t make any progress…! I tried many different configurations and had no luck. I also visited the following url:http://www.voip-info.org/wiki/view/Asterisk+SIP+NAT+solutions, and no progress was made. All I want really is to suppress the … :smiling_imp: … local address of the Astersik and pass the call through the trunk. Any suggestion is much appreciated.

Regards,

Make sure the trunk has NAT on.

Make sure localnets doesn’t include the trunk.

Make sure that you have an externhost or externip configured.

I finally managed to find a solution with the registration! Now the problem I am facing is that I can dial a number get the rigning tone and when I pick up the called device after 1 second the call is being dropped. Additionally, I can not gt incoming calls!!! Any help ip more than welcome. By the way is there any useful dialplan explanation guide. They all sound Greek to me!!! :smiley:

Thank you all for your support.

Regards,
Asteriskos

Here’s the sip trace:

<— SIP read from UDP:192.168.1.3:22732 —>
INVITE sip:2XXXXXXXXX@192.168.1.4:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.3:22732;branch=z9hG4bK-d8754z-2df904211e72414e-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:1000@192.168.1.3:22732
To: "2XXXXXXXXXX"sip:2XXXXXXXXXXX@192.168.1.4:5060
From: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 402

v=0
o=- 12953134942167857 1 IN IP4 192.168.1.3
s=CounterPath X-Lite 4.0
c=IN IP4 192.168.1.3
t=0 0
a=ice-ufrag:7c8100
a=ice-pwd:bbe9e3bb6729c33788edc04630df8078
m=audio 50994 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 192.168.1.3 50994 typ host
a=candidate:1 2 UDP 659134 192.168.1.3 50995 typ host

<------------->
— (13 headers 14 lines) —
== Using SIP RTP CoS mark 5
Sending to 192.168.1.3 : 22732 (no NAT)
Using INVITE request as basis request - YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
Found peer ‘1000’ for ‘1000’ from 192.168.1.3:22732
Found RTP audio format 107
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format BV32 for ID 107
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.1.3:50994
Looking for 2XXXXXXXXXXX in phones (domain 192.168.1.4)
list_route: hop: sip:1000@192.168.1.3:22732

<— Transmitting (no NAT) to 192.168.1.3:22732 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.3:22732;branch=z9hG4bK-d8754z-2df904211e72414e-1—d8754z-;received=192.168.1.3;rport=22732
From: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
To: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:XXXXXXXX@192.168.1.4
Content-Length: 0

<------------>
– Executing [XXXXXXXX@phones:1] NoOp(“SIP/1000-0000001e”, “”) in new stack
– Executing [XXXXXXXX@phones:2] Dial(“SIP/1000-0000001e”, “SIP/XXXX/XXXXXXXX”) in new stack
== Using SIP RTP CoS mark 5
Audio is at 192.168.1.4 port 17110
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to XXXX.XXX.XX.XXX:5060:
INVITE sip:XXXXXXXX@fms.XXXXXXcom.gr SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK10b5b555;rport
Max-Forwards: 70
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
To: sip:XXXXXXXX@fms.XXXXXXcom.gr
Contact: sip:0030XXXXXXXX@192.168.1.4
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.11
Date: Tue, 21 Jun 2011 17:01:33 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 280

v=0
o=root 176737716 176737716 IN IP4 192.168.1.4
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.1.4
t=0 0
m=audio 17110 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


-- Called XXXX/XXXXXXXX

<— SIP read from UDP:XXXX.XXX.XX.XXX:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4;rport=5061;branch=z9hG4bK10b5b555
To: sip:XXXXXXXX@fms.XXXXXXcom.gr
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 102 INVITE
Content-Length: 0

<------------->
— (7 headers 0 lines) —

<— SIP read from UDP:XXXX.XXX.XX.XXX:5060 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4;rport=5061;branch=z9hG4bK10b5b555
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 102 INVITE
Contact: sip:sgc_c@XXXX.XXX.XX.XXX;transport=udp
Record-Route: sip:XXXX.XXX.XX.XXX;transport=udp;lr
Content-Type: application/sdp
Content-Length: 237
Session: Media
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE

v=0
o=BroadWorks 62275919 1 IN IP4 XXXX.XXX.XX.XXX
s=-
c=IN IP4 10.224.64.8
t=0 0
m=audio 50774 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=sqn: 0
a=cdsc: 1 audio RTP/AVP 8
a=cpar: a=rtpmap:8 PCMA/8000
a=cdsc: 2 image udptl t38
a=sendrecv

<------------->
— (12 headers 12 lines) —
Found RTP audio format 8
Found audio description format PCMA for ID 8
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 10.224.64.8:50774
– SIP/XXXX-0000001f is making progress passing it to SIP/1000-0000001e
Audio is at 192.168.1.4 port 15210
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Transmitting (no NAT) to 192.168.1.3:22732 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.3:22732;branch=z9hG4bK-d8754z-2df904211e72414e-1—d8754z-;received=192.168.1.3;rport=22732
From: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
To: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:XXXXXXXX@192.168.1.4
Content-Type: application/sdp
Content-Length: 259

v=0
o=root 1223762041 1223762041 IN IP4 192.168.1.4
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.1.4
t=0 0
m=audio 15210 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>

<— SIP read from UDP:XXXX.XXX.XX.XXX:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4;rport=5061;branch=z9hG4bK10b5b555
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 102 INVITE
Contact: sip:sgc_c@XXXX.XXX.XX.XXX;transport=udp
Record-Route: sip:XXXX.XXX.XX.XXX;transport=udp;lr
Content-Type: application/sdp
Content-Length: 237
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE

v=0
o=BroadWorks 62275919 1 IN IP4 XXXX.XXX.XX.XXX
s=-
c=IN IP4 10.224.64.8
t=0 0
m=audio 50774 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=sqn: 0
a=cdsc: 1 audio RTP/AVP 8
a=cpar: a=rtpmap:8 PCMA/8000
a=cdsc: 2 image udptl t38
a=sendrecv

<------------->
— (11 headers 12 lines) —
– SIP/XXXX-0000001f is ringing

<— Transmitting (no NAT) to 192.168.1.3:22732 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.3:22732;branch=z9hG4bK-d8754z-2df904211e72414e-1—d8754z-;received=192.168.1.3;rport=22732
From: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
To: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:XXXXXXXX@192.168.1.4
Content-Length: 0

<------------>
– SIP/XXXX-0000001f is making progress passing it to SIP/1000-0000001e

<— SIP read from UDP:XXXX.XXX.XX.XXX:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4;rport=5061;branch=z9hG4bK10b5b555
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 102 INVITE
Contact: sip:sgc_c@XXXX.XXX.XX.XXX;transport=udp
Record-Route: sip:XXXX.XXX.XX.XXX;transport=udp;lr
Require: timer
Session-Expires: 1800;refresher=uac
Content-Type: application/sdp
Content-Length: 237
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, PRACK, REFER, UPDATE, NOTIFY
Accept: multipart/mixed
Accept: application/media_control+xml
Accept: application/sdp

v=0
o=BroadWorks 62275919 1 IN IP4 XXXX.XXX.XX.XXX
s=-
c=IN IP4 10.224.64.8
t=0 0
m=audio 50774 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=sqn: 0
a=cdsc: 1 audio RTP/AVP 8
a=cpar: a=rtpmap:8 PCMA/8000
a=cdsc: 2 image udptl t38
a=sendrecv

<------------->
— (16 headers 12 lines) —
list_route: hop: sip:XXXX.XXX.XX.XXX;transport=udp;lr
set_destination: Parsing sip:XXXX.XXX.XX.XXX;transport=udp;lr for address/port to send to
set_destination: set destination to XXXX.XXX.XX.XXX, port 5060
Transmitting (no NAT) to XXXX.XXX.XX.XXX:5060:
ACK sip:sgc_c@XXXX.XXX.XX.XXX;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK4dea3f6b;rport
Route: sip:XXXX.XXX.XX.XXX;transport=udp;lr
Max-Forwards: 70
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
Contact: sip:0030XXXXXXXX@192.168.1.4
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.11
Content-Length: 0


-- SIP/XXXX-0000001f answered SIP/1000-0000001e

Audio is at 192.168.1.4 port 15210
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (no NAT) to 192.168.1.3:22732 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.3:22732;branch=z9hG4bK-d8754z-2df904211e72414e-1—d8754z-;received=192.168.1.3;rport=22732
From: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
To: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: sip:XXXXXXXX@192.168.1.4
Content-Type: application/sdp
Content-Length: 259

v=0
o=root 1223762041 1223762042 IN IP4 192.168.1.4
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.1.4
t=0 0
m=audio 15210 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>
– Native bridging SIP/1000-0000001e and SIP/XXXX-0000001f
set_destination: Parsing sip:XXXX.XXX.XX.XXX;transport=udp;lr for address/port to send to
set_destination: set destination to XXXX.XXX.XX.XXX, port 5060
Audio is at 192.168.1.4 port 17110
Adding codec 0x8 (alaw) to SDP
Reliably Transmitting (no NAT) to XXXX.XXX.XX.XXX:5060:
INVITE sip:sgc_c@XXXX.XXX.XX.XXX;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK7e5798ad;rport
Route: sip:XXXX.XXX.XX.XXX;transport=udp;lr
Max-Forwards: 70
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
Contact: sip:0030XXXXXXXX@192.168.1.4
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 103 INVITE
User-Agent: Asterisk PBX 1.6.2.11
Require: timer
Session-Expires: 1800;refresher=uac
Min-SE: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 177

v=0
o=root 176737716 176737717 IN IP4 192.168.1.3
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.1.3
t=0 0
m=audio 50994 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:20
a=sendrecv


<— SIP read from UDP:192.168.1.3:22732 —>
ACK sip:XXXXXXXX@192.168.1.4 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.3:22732;branch=z9hG4bK-d8754z-2c6b62cc40535d52-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:1000@192.168.1.3:22732
To: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
From: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 1 ACK
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 0

<------------->
— (10 headers 0 lines) —
set_destination: Parsing sip:1000@192.168.1.3:22732 for address/port to send to
set_destination: set destination to 192.168.1.3, port 22732
Audio is at 192.168.1.4 port 15210
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.1.3:22732:
INVITE sip:1000@192.168.1.3:22732 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK02a8e6d4;rport
Max-Forwards: 70
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
Contact: sip:XXXXXXXX@192.168.1.4
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 259

v=0
o=root 1223762041 1223762043 IN IP4 10.224.64.8
s=Asterisk PBX 1.6.2.11
c=IN IP4 10.224.64.8
t=0 0
m=audio 50774 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


<— SIP read from UDP:192.168.1.3:22732 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK02a8e6d4;rport=5060
Contact: sip:1000@192.168.1.3:22732
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 373

v=0
o=- 12953134942167857 2 IN IP4 192.168.1.3
s=CounterPath X-Lite 4.0
c=IN IP4 192.168.1.3
t=0 0
a=ice-ufrag:7c8100
a=ice-pwd:bbe9e3bb6729c33788edc04630df8078
m=audio 50994 RTP/AVP 0 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 192.168.1.3 50994 typ host
a=candidate:1 2 UDP 659134 192.168.1.3 50995 typ host

<------------->
— (12 headers 13 lines) —
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.1.3:50994
set_destination: Parsing sip:1000@192.168.1.3:22732 for address/port to send to
set_destination: set destination to 192.168.1.3, port 22732
Transmitting (no NAT) to 192.168.1.3:22732:
ACK sip:1000@192.168.1.3:22732 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK3952bb5a;rport
Max-Forwards: 70
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
Contact: sip:XXXXXXXX@192.168.1.4
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.11
Content-Length: 0


<— SIP read from UDP:XXXX.XXX.XX.XXX:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4;rport=5061;branch=z9hG4bK7e5798ad
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 103 INVITE
Content-Length: 0

<------------->
— (7 headers 0 lines) —

<— SIP read from UDP:XXXX.XXX.XX.XXX:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4;rport=5061;branch=z9hG4bK7e5798ad
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 103 INVITE
Contact: sip:sgc_c@XXXX.XXX.XX.XXX;transport=udp
Require: timer
Session-Expires: 1800;refresher=uac
Content-Type: application/sdp
Content-Length: 237
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, PRACK, REFER, UPDATE, NOTIFY
Accept: multipart/mixed
Accept: application/media_control+xml
Accept: application/sdp

v=0
o=BroadWorks 62275919 2 IN IP4 XXXX.XXX.XX.XXX
s=-
c=IN IP4 10.224.64.8
t=0 0
m=audio 50774 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=sqn: 0
a=cdsc: 1 audio RTP/AVP 8
a=cpar: a=rtpmap:8 PCMA/8000
a=cdsc: 2 image udptl t38
a=sendrecv

<------------->
— (15 headers 12 lines) —
Found RTP audio format 8
Found audio description format PCMA for ID 8
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 10.224.64.8:50774
set_destination: Parsing sip:XXXX.XXX.XX.XXX;transport=udp;lr for address/port to send to
set_destination: set destination to XXXX.XXX.XX.XXX, port 5060
Transmitting (no NAT) to XXXX.XXX.XX.XXX:5060:
ACK sip:sgc_c@XXXX.XXX.XX.XXX;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK0645f456;rport
Route: sip:XXXX.XXX.XX.XXX;transport=udp;lr
Max-Forwards: 70
From: “1000” sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
To: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
Contact: sip:0030XXXXXXXX@192.168.1.4
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 103 ACK
User-Agent: Asterisk PBX 1.6.2.11
Content-Length: 0


<— SIP read from UDP:XXXX.XXX.XX.XXX:5060 —>
BYE sip:0030XXXXXXXX@192.168.1.4:5060 SIP/2.0
Max-Forwards: 70
Via: SIP/2.0/UDP XXXX.XXX.XX.XXX:5060;branch=z9hG4bKp2mmfe6qpyidovndtx6kc2s7d
To: sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
From: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 1 BYE
Reason: SIP ;cause=503;text="Service Unavailable (10:211)"
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to XXXX.XXX.XX.XXX : 5060 (no NAT)

<— Transmitting (no NAT) to XXXX.XXX.XX.XXX:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP XXXX.XXX.XX.XXX:5060;branch=z9hG4bKp2mmfe6qpyidovndtx6kc2s7d;received=XXXX.XXX.XX.XXX
From: sip:XXXXXXXX@fms.XXXXXXcom.gr;tag=h7g4Esbg_365288422-1308661343643
To: sip:0030XXXXXXXX@fms.XXXXXXcom.gr;tag=as6c9ac3fe
Call-ID: 4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr
CSeq: 1 BYE
Server: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

<------------>
set_destination: Parsing sip:1000@192.168.1.3:22732 for address/port to send to
set_destination: set destination to 192.168.1.3, port 22732
Audio is at 192.168.1.4 port 15210
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.1.3:22732:
INVITE sip:1000@192.168.1.3:22732 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK7db67d7d;rport
Max-Forwards: 70
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
Contact: sip:XXXXXXXX@192.168.1.4
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 103 INVITE
User-Agent: Asterisk PBX 1.6.2.11
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 259

v=0
o=root 1223762041 1223762044 IN IP4 192.168.1.4
s=Asterisk PBX 1.6.2.11
c=IN IP4 192.168.1.4
t=0 0
m=audio 15210 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


== Spawn extension (phones, XXXXXXXX, 2) exited non-zero on 'SIP/1000-0000001e’
Scheduling destruction of SIP dialog ‘YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.’ in 32000 ms (Method: ACK)

<— SIP read from UDP:192.168.1.3:22732 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK7db67d7d;rport=5060
Contact: sip:1000@192.168.1.3:22732
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 373

v=0
o=- 12953134942167857 3 IN IP4 192.168.1.3
s=CounterPath X-Lite 4.0
c=IN IP4 192.168.1.3
t=0 0
a=ice-ufrag:7c8100
a=ice-pwd:bbe9e3bb6729c33788edc04630df8078
m=audio 50994 RTP/AVP 0 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 192.168.1.3 50994 typ host
a=candidate:1 2 UDP 659134 192.168.1.3 50995 typ host

<------------->
— (12 headers 13 lines) —
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.1.3:50994
set_destination: Parsing sip:1000@192.168.1.3:22732 for address/port to send to
set_destination: set destination to 192.168.1.3, port 22732
Transmitting (no NAT) to 192.168.1.3:22732:
ACK sip:1000@192.168.1.3:22732 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK4af64dd9;rport
Max-Forwards: 70
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
Contact: sip:XXXXXXXX@192.168.1.4
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 103 ACK
User-Agent: Asterisk PBX 1.6.2.11
Content-Length: 0


set_destination: Parsing sip:1000@192.168.1.3:22732 for address/port to send to
set_destination: set destination to 192.168.1.3, port 22732
Reliably Transmitting (no NAT) to 192.168.1.3:22732:
BYE sip:1000@192.168.1.3:22732 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK657b208b;rport
Max-Forwards: 70
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 104 BYE
ser-Agent: Asterisk PBX 1.6.2.11
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


Scheduling destruction of SIP dialog ‘YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.’ in 32000 ms (Method: ACK)
Really destroying SIP dialog '4cedeb890b8bbd474666301c4cccb290@fms.XXXXXXcom.gr’ Method: BYE

<— SIP read from UDP:192.168.1.3:22732 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK657b208b;rport=5060
Contact: sip:1000@192.168.1.3:22732
To: "1000"sip:1000@192.168.1.4:5060;tag=973b6b2f
From: "XXXXXXXX"sip:XXXXXXXX@192.168.1.4:5060;tag=as010b1c56
Call-ID: YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.
CSeq: 104 BYE
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Really destroying SIP dialog ‘YWViMzJkY2FkOTM4MDk1ZmI3MWZiOGVhZThiMWMyMGU.’ Method: ACK

<— SIP read from UDP:192.168.1.3:22732 —>

<------------->

Typically means you are not permitted to do what you asked to do.

Looks like you may have tried to externally bridge to a private address (canreinvite/direct media, possibly interacting with a faulty NAT setting).

Thank you for your support david55,

Given that I am short of comfused will it help if I post the config I am using, to clean it up from excessive information ?

Regards,

Here’s the scenario I need to implement. I am starting a home working business and I will use X-lite softphones (in that case only one, when I will make progress I will add some extra softphones). In order to be able to do that I bought a sip service from a local provider which seems to me very reliable. I started a step by step configuration and here’s how far I went:
sip.conf

[general]
srvlookup =yes
registerattempts = 1

register => telconum@telcodomain:password@telcodomain~300

[1000]
type = friend
context = phones
nat=no
host = dynamic
disallow = all
allow = alaw

[Trunk_SIP]
type = friend
username = telcousername
host = telcodomain
fromuser = telcouser
secret = userpass
;context=incoming_calls
context = phones
;---------------MyADDONS-----
externhost = telecohostaddress
localnet = no
bindport = 5060
bindaddr = 0.0.0.0
canreinvite = nonat
qualify = no
nat = yes
outboundproxy = outbound proxy of telco
;-----------------------------
dtmfmode = rfc2833
disallow=all
allow = alaw
insecure = invite

extensions.conf

[general]
autofallthrough = yes

[default]
;exten => s,1,Verbose(1|Unrouted call handler)
;exten => s,n,Answer()
;exten => s,n,Wait(10)
;exten => s,n,Playback(tt-weasels)
;exten => s,n,Hangup()

[incoming_calls]
exten => _X.,1.NoOp()
exten => 1000,3,Dial(SIP/Trunk_SIP)

[outgoing_calls]
exten => _X.,1,NoOp()
exten => _X.,n,Dial(SIP/Trunk_SIP/${EXTEN},30)

[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Echo()
exten => 500,n,Hangup()

exten => 1000,1,Verbose(1|Extension 1000)
exten => 1000,n,Dial(SIP/1000,30)
exten => 1000,n,Hangup()

[phones]
include => internal
include => outgoing_calls
include => incoming_calls

So far, I was only capable of making partial outgoing calls, and listen to the music every time I was calling myself… I was unable to receive incoming calls. :exclamation: :exclamation:

Any valuable help will be much appreciated.

Thank you. :open_mouth: :open_mouth:

externhost = telecohostaddress
localnet = no

externhost should be a name and it should be yours, not the telco’s.

locanet should be a subnet pattern x.x.x.x/x

Not looked any further.