Summary: | ASTERISK-16654: [patch] SIP peer wrong URI an to: tag | ||
Reporter: | adria vidal (adriavidal) | Labels: | |
Date Opened: | 2010-09-07 10:25:39 | Date Closed: | 2010-09-15 08:10:52 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) sip-tohost-fix1.diff | |
Description: | When doing an outgoing call with a defined peer the call have wrong to: URI Asterisk is putting the IP of the host and not the hostname into the URI. U 2010/09/07 17:08:47.769499 87.98.XX.XX:5060 -> 87.94.XX.XX:5060 INVITE sip:607XXXXXX@87.94.XX.XX SIP/2.0? Via: SIP/2.0/UDP 87.98.XX.XX:5060;branch=z9hG4bK0982bfd1? Max-Forwards: 70? From: "me" <sip:adriavidal@sip.proxy.net>;tag=as4582f1da? To: <sip:607XXXXXX@87.94.XX.XX>? Contact: <sip:adriavidal@87.98.XX.XX:5060>? Call-ID: 2c210e6932761d2775058f7238c0f3ba@sip.proxy.net? CSeq: 102 INVITE? User-Agent: Asterisk PBX 1.8.0-beta4? Date: Tue, 07 Sep 2010 14:46:52 GMT? Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH? Supported: replaces, timer? Content-Type: application/sdp? Content-Length: 309? ? v=0? o=root 95065959 95065959 IN IP4 87.98.XX.XX? s=Asterisk PBX 1.8.0-beta4? c=IN IP4 87.98.XX.XX? t=0 0? m=audio 15774 RTP/AVP 18 3 101? a=rtpmap:18 G729/8000? a=fmtp:18 annexb=no? a=rtpmap:3 GSM/8000? a=rtpmap:101 telephone-event/8000? a=fmtp:101 0-16? a=silenceSupp:off - - - -? a=ptime:20? a=sendrecv? # U 2010/09/07 17:08:47.783243 87.94.XX.XX:5060 -> 87.98.XX.XX:5060 SIP/2.0 403 Outbound Not Allowed? Via: SIP/2.0/UDP 87.98.XX.XX:5060;branch=z9hG4bK0982bfd1;rport=5060? From: "me" <sip:adriavidal@sip.proxy.net>;tag=as4582f1da? To: <sip:607XXXXXX@87.94.XX.XX>;tag=1ce00265432104f70edaf1386bb937d7.61ac? Call-ID: 2c210e6932761d2775058f7238c0f3ba@sip.proxy.net? CSeq: 102 INVITE? Server: OpenSER (1.3.2-tls (i386/linux))? Content-Length: 0? that's the peer definition [ilimit] type=peer host=sip.proxy.net fromuser=adriavidal defaultuser=adriavidal fromdomain=sip.proxy.net secret=xxxxxxxxxxx context=from-proxy insecure=port,invite canreinvite=no disallow=all allow=g729 allow=gsm allow=g722 ;allow=g723 qualify=no | ||
Comments: | By: mich (mich) 2010-09-08 13:48:12 Confirm. My outcoming calls not working, provider have multiple realms on ip. By: Matthew Nicholson (mnicholson) 2010-09-14 17:41:32 Please test with the sip-tohost-fix1.diff patch I just uploaded. By: mich (mich) 2010-09-15 02:57:13 Seems ok with both registry and callbackext. Thx! By: adria vidal (adriavidal) 2010-09-15 04:01:49 The To: is fixed now, but into the from the domain is the IP from the Asterisk himself not the domain of destination, and seems to be causing problems with the remote proxy. wrong capture U 2010/09/15 10:50:13.886659 87.98.XXX.XX:5060 -> 80.94.X.XX:5060 INVITE sip:607XXXXXX@sip.proxy.net SIP/2.0? Via: SIP/2.0/UDP 87.98.XXX.XX:5060;branch=z9hG4bK5d41ef1d? Max-Forwards: 70? From: "A" <sip:adriavidal@87.98.XXX.XX>;tag=as30270354? To: <sip:607XXXXXX@sip.proxy.net>? Contact: <sip:adriavidal@87.98.XXX.XX:5060>? Call-ID: 1a50bfc674fa95b85eeedb7567a0c26f@87.98.XXX.XX:5060? CSeq: 102 INVITE? User-Agent: Asterisk PBX 1.8.0-beta4? Date: Wed, 15 Sep 2010 08:49:03 GMT? Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH? Supported: replaces, timer? Content-Type: application/sdp? Content-Length: 313? By: Matthew Nicholson (mnicholson) 2010-09-15 07:55:04 If you would like a domain to appear in the From: header, use the 'fromdomain' setting in the peer definition or in the general section. By: adria vidal (adriavidal) 2010-09-15 08:04:16 Sorry mnicholson, i comented out these option when i was doing some tests, everthing ok now. Thanks. By: Digium Subversion (svnbot) 2010-09-15 08:05:53 Repository: asterisk Revision: 286868 U branches/1.8/channels/chan_sip.c ------------------------------------------------------------------------ r286868 | mnicholson | 2010-09-15 08:05:53 -0500 (Wed, 15 Sep 2010) | 16 lines Set tohost to the domain specified in the configuration file instead of the IP address of the host we are calling. This fixes a regression introduced in r274783. (closes issue ASTERISK-16654) Reported by: adriavidal Patches: sip-tohost-fix1.diff uploaded by mnicholson (license 96) Tested by: mich, mnicholson, adriavidal (closes issue ASTERISK-16396) Reported by: outcast Patches: sip-tohost-fix1.diff uploaded by mnicholson (license 96) Tested by: mnicholson ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=286868 By: Digium Subversion (svnbot) 2010-09-15 08:10:51 Repository: asterisk Revision: 286869 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r286869 | mnicholson | 2010-09-15 08:10:50 -0500 (Wed, 15 Sep 2010) | 23 lines Merged revisions 286868 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r286868 | mnicholson | 2010-09-15 08:05:52 -0500 (Wed, 15 Sep 2010) | 16 lines Set tohost to the domain specified in the configuration file instead of the IP address of the host we are calling. This fixes a regression introduced in r274783. (closes issue ASTERISK-16654) Reported by: adriavidal Patches: sip-tohost-fix1.diff uploaded by mnicholson (license 96) Tested by: mich, mnicholson, adriavidal (closes issue ASTERISK-16396) Reported by: outcast Patches: sip-tohost-fix1.diff uploaded by mnicholson (license 96) Tested by: mnicholson ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=286869 |