Problem for a complex call forward

I still have:
Client 1
----------asterisk0(client)—asterisk1(ss7)–Asterisk2(media)
Client 2

When client1 do a call, asterisk0 forward to asterisk1, asterisk1 forward to asterisk2, asterisk2 forward to
Asterisk1
At this moment, asterisk1 say : 404Not found But I have insecure=very

This is the sip debug at that moment:

[code]<------------->
— (11 headers 0 lines) —

<— SIP read from UDP://192.168.1.151:5060 —> INVITE sip:33170725012@192.168.1.153 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.151:5060;branch=z9hG4bK2b4a242e;rport
Max-Forwards: 70
From: “103” sip:103@192.168.1.151;tag=as636875d3
To: sip:33170725012@192.168.1.153
Contact: sip:103@192.168.1.151
Call-ID: 4bdd7c785c834d662f9523ce5460bf44@192.168.1.151
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Date: Thu, 04 Dec 2008 14:55:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 289

v=0
o=root 1545198644 1545198644 IN IP4 192.168.1.151 s=Asterisk PBX 1.6.0.1 c=IN IP4 192.168.1.151 t=0 0 m=audio 12272 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
— (14 headers 13 lines) —
== Using SIP RTP CoS mark 5
Sending to 192.168.1.151 : 5060 (NAT)
Using INVITE request as basis request -
4bdd7c785c834d662f9523ce5460bf44@192.168.1.151
No user ‘103’ in SIP users list
Found peer ‘media’ for ‘103’ from 192.168.1.151:5060 Found RTP audio format 0 Found RTP audio format 8 Found RTP audio format 101 Peer audio RTP is at port 192.168.1.151:12272 Found audio description format PCMU for ID 0 Found audio description format PCMA for ID 8 Found audio description format telephone-event for ID 101 Got unsupported a:fmtp in SDP offer
Capabilities: us - 0xc (ulaw|alaw), 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.151:12272 Looking for 33170725012 in media (domain 192.168.1.153)

<— Reliably Transmitting (no NAT) to 192.168.1.151:5060 —> SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
192.168.1.151:5060;branch=z9hG4bK2b4a242e;received=192.168.1.151;rport=5060
From: “103” sip:103@192.168.1.151;tag=as636875d3
To: sip:33170725012@192.168.1.153;tag=as242de969
Call-ID: 4bdd7c785c834d662f9523ce5460bf44@192.168.1.151
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Length: 0[/code]

sip.conf (ss7)

[code][general]
context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port for unencrypted UDP
bindaddr=192.168.1.153 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=192.168.1.153 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)

srvlookup=yes ; Enable DNS SRV lookups on outbound calls

[client]
type=friend
qualify=yes
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
canreinvite=no
insecure=invite
progressinband=yes
context=entrant
host=192.168.1.154

[media]
type=friend
qualify=yes
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
canreinvite=no
insecure=invite
progressinband=yes
context=media
host=192.168.1.151[/code]

extensions.conf(ss7)

[code][general]
static=yes
writeprotect=yes
clearglobalvars=no

[media] ;change with the comment from the next message

exten => _X.,1,Answer()
exten => _X.,2,DIAL(SIP/client/${EXTEN})

[entrant]

exten => 102,1,DIAL(SIP/102)

exten => _X.,1,Answer()
exten => _X.,2,DIAL(SIP/media/${EXTEN})
exten => _X.,3,HangUp()[/code]

sip.conf(media)

[code][general]
context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port for unencrypted UDP
bindaddr=192.168.1.151 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=192.168.1.151 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)

srvlookup=yes ; Enable DNS SRV lookups on outbound calls

[ss7]
type=peer
qualify=yes
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
canreinvite=yes
insecure=invite
progressinband=yes
context=ss7
host=192.168.1.153
;canreinvite=yes[/code]

extensions.conf(media)

[code][general]
static=yes
writeprotect=yes
clearglobalvars=no

[ss7]

exten => _X.,1,DIAL(SIP/ss7/${EXTEN})
exten => _X.,2,HangUp()

[/code]

Have you an idea why ?

There is no media context in the dial plan.

Incidentally, why are you answering the calls?

ok I saw I mistake :smile:

but now, asterisk0(client) give an error when the call come back…

[code]<------------>
– Packet2Packet bridging SIP/103-08223c48 and SIP/ss7-0822a010
client>
<— SIP read from UDP://192.168.1.153:5060 —>
INVITE sip:33170725012@192.168.1.154 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.153:5060;branch=z9hG4bK1f7964cb;rport
Max-Forwards: 70
From: “103” sip:103@192.168.1.153;tag=as66ecdd3b
To: sip:33170725012@192.168.1.154
Contact: sip:103@192.168.1.153
Call-ID: 6a28bc803b0795e44c94ed4e6285f033@192.168.1.153
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Date: Fri, 05 Dec 2008 08:47:59 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 289

v=0
o=root 1803391067 1803391067 IN IP4 192.168.1.153
s=Asterisk PBX 1.6.0.1
c=IN IP4 192.168.1.153
t=0 0
m=audio 15270 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
— (14 headers 13 lines) —
== Using SIP RTP CoS mark 5
Sending to 192.168.1.153 : 5060 (NAT)
Using INVITE request as basis request - 6a28bc803b0795e44c94ed4e6285f033@192.168.1.153
Found user ‘103’ for ‘103’

<— Reliably Transmitting (no NAT) to 192.168.1.153:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.153:5060;branch=z9hG4bK1f7964cb;received=192.168.1.153;rport=5060
From: “103” sip:103@192.168.1.153;tag=as66ecdd3b
To: sip:33170725012@192.168.1.154;tag=as340b5312
Call-ID: 6a28bc803b0795e44c94ed4e6285f033@192.168.1.153
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="54766c1c"
Content-Length: 0

[/code]

sip.conf(client)

[code][general]
context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port for unencrypted UDP
bindaddr=192.168.1.154 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=192.168.1.154 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)

srvlookup=yes ; Enable DNS SRV lookups on outbound calls

[ss7]
type=peer
qualify=yes
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
canreinvite=no
insecure=invite
progressinband=yes
context=ss7
host=192.168.1.153
;canreinvite=yes

[102]
type=friend
host=dynamic
secret=102
context=default
qualify=200
canreinvite=no
insecure=invite

[103]
type=friend
host=dynamic
secret=103
context=default
qualify=200
canreinvite=no
insecure=invite
[/code]

extensions.conf(client)

[code][general]
static=yes
writeprotect=yes
clearglobalvars=no

[globals]
SERV_SEC=0
SERV_SEI=0
codec=g711

;[ser_sei]
;
;exten => _X.,1,SIPAddHeader(x-acro-chemin: ${SIP_HEADER(x-acro-chemin)}|media1)
;exten => _X.,2,SIPAddHeader(x-acro-dst_ext: ${SIP_HEADER(x-acro-dst_ext)})
;exten => _X.,3,SIPAddHeader(x-acro-fax: ${SIP_HEADER(x-acro-fax)})
;exten => _X.,4,SIPAddHeader(x-acro-codec: g711)
;exten => _X.,5,DIAL(SIP/ser_sei1/${EXTEN})
;exten => _X.,6,HangUp()

[ss7]

exten => _X.,1,Dial(SIP/102/${EXTEN})

[default]

exten => _X.,1,Dial(SIP/ss7/${EXTEN})[/code]

please help me :smile:

User 103 is taking precedence over the peer for ss7; you will need to modify the CLI to break the conflict.

Incidentally, weren’t you the person asking about optimising the RTP path; if so canrinvite=no is an absolute block on such optimisation.

what have I to modify?

I send an other topic to try to have sip sign to the right asterisk but no RTP to the right. which canreinvite have I to modify (which server) ?

I tryed to comment all canreinvite=no
but, I have the same problem

here my capture (wireshark)

dl.free.fr/lKmTjZ79o
or
megaupload.com/?d=IHY463FF

canreinvite will not affect your 401 problem.

As I said, you have to make sure that the dialplan modifies the caller ID so that the returning copy of the call doesn’t have a user part of just 103. You can undo the modification, if you like, before finally disposing of it.

you said that I have to change the callerid in the dialplan ?

thats ok!!!

in the asterisk2 (media) extensions.conf

I insert

exten => _X.,1,Set(CALLERID(all)=Joe Smith <2095551212>)

to change the Callerid… and the asterisk0 accept the call

thank you so much for help david
.
.

This issue may be relevant to the problem that required the caller id to be changed:

bugs.digium.com/view.php?id=13296