[Home]

Summary:ASTERISK-02577: SIP INVITE header doesn't include number to dial.
Reporter:ipso (ipso)Labels:
Date Opened:2004-10-10 03:51:24Date Closed:2008-01-15 15:10:31.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) extdial.txt
Description:I recently upgraded from a few month old CVS version of Asterisk to
v1.0.1, and dialing out through my SPA-3000 stopped working completely.

Notice right after INVITE, in the old CVS version, it includes the
number I'm trying to dial (8019596) which works fine, however in v1.0.1, it doesn't include the number and of course the dial fails.


****** ADDITIONAL INFORMATION ******

Old CVS version of Asterisk: (works fine)
--------------------------------
Oct  4 23:18:07 192.168.1.190 INVITE sip:8019596@192.168.1.190:5061
SIP/2.0
Via: SIP/2.0/UDP 192.168.1.3:5060
;branch=z9hG4bK522738f1
From: "asterisk"
<sip:asterisk@192.168.1.3>;tag=as52daeb2d
To: <sip:8019596@192.168
.1.190:5061>^M Contact: <sip:asterisk@192.168.1.3>
Call-ID:
2d02c0cc392a99264f5f09666c3ff875@192.168.1.3
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Tue, 05 Oct 2004 06:18:07 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 214
v=0^M o=root 27838 27838 IN IP4 1
92.168.1.3^M s=session^M c=IN IP4 192.168.1.3^M t=0 0^M m=audio 13232
RTP/AVP 0 101^M a=rtpmap:0 PCMU/8000^M a=
rtpmap:101 telephone-event/8000^M a=fmtp:101 0-16^M a=silenceSupp:off -
- - -^M


Asterisk v1.0.1: (doesn't work)
---------------------------------
Sep 30 20:38:45 192.168.1.190
INVITE sip:500@192.168.1.190:5061 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.3:5060;branch=z9hG4bK36cac9c5
From: "2508019596" <sip:2508019596@192.168.1.3>;tag=as7f1bd067
To: <sip:500@192.168.1.190:5061>
Contact: <sip:2508019596@192.168.1.3>
Call-ID: 0701aef72bda06da6e3fb4593dc78e31@192.168.1.3
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Fri, 01 Oct 2004 03:38:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 214
v=0^M o=root 22051 22051 IN
IP4 192.168.1.3^M s=session^M c=IN IP4 192.168.1.3^M t=0 0^M m=audio
14996 RTP/AVP 0 101^M a=rtpmap:0 PCMU/8000^M a=rtpmap:101 telephone-
event/8000^M a=fmtp:101 0-16^M a=silenceSupp:off - - - -^M
Comments:By: Olle Johansson (oej) 2004-10-10 10:10:53

Please include more information, the dial plan (extensions.conf) and the sip.conf for this.

By: Mark Spencer (markster) 2004-10-10 11:56:12

Olle, this is your fault.  Remember that thing about the full contact?  Remember how I asked you "are there any cases where this wouldn't work?" Well here's one :)

Now I need you to figure out what the spec says.

As for you, ipso, just don't have the one box register with the other and your problem will go away.

By: Olle Johansson (oej) 2004-10-10 12:20:02

Still need config information to be able to duplicate problem!

By: Olle Johansson (oej) 2004-10-10 12:43:06

My guess is (like markster's) that you register from the Sipura to Asterisk. The extension you see, is what the Sipura is registering.

When you want to dial out, define another peer that doesn't register and dial out through that peer. In that case, we will not overwrite the extension.

Please confirm if this works for you. We will go through the code and see if we can do something else meanwhile, but we also need to get you going :-)

By: ipso (ipso) 2004-10-10 13:36:20

Extension.conf:
exten => s,3,Dial(SIP/500/${ARG1},,T)

[500]
type=friend
host=dynamic
context=mainmenu
secret=xxxxxx
qualify=yes
dtmfmode=rfc2833
nat=0
reinvite=no
canreinvite=no

Yes, the SPA-3000 is set to register itself with Asterisk.

I can try turning off the register, but then I need to define the IP address in Asterisk don't I? The problem with that is that the SPA-3000 gets its IP with DHCP, and its not static. :(

By: Olle Johansson (oej) 2004-10-10 13:44:42

Ok, if so, then there's no quick fix. Let me look at the code and see how we can fix this. Please, give me a day or so.

By: ipso (ipso) 2004-10-10 13:45:05

I saw an email on the users list that may confirm turning off register and dialing directly to the IP address works around the problem:

From: Jeff owen <owenj@surfree.net>
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' <asterisk-users@lists.digium.com>
Subject: RE: [Asterisk-Users] SPA-3k outbound calls...
Date: Sun, 10 Oct 2004 10:01:44 -0400  (07:01 PDT)


That was it,

It workie now.

Thanks,

Jeff

(BTW...running Asterisk V1.0.1 on Debian sparc64 (sun4m) UE2 w/2 300mhz and
1 gig ram connecting to an SPA-3k with firmware 2.0.10(GWf))

-----Original Message-----
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Ray
Sent: Sunday, October 10, 2004 2:17 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] SPA-3k outbound calls...

On Sat, Oct 09, 2004 at 11:41:41PM -0400, Jeff owen wrote:
> Ok, now since I have inbound working properly the outbound seemed to have
> gotten hosed.
>
>  
>
> In the extensions.conf I have it setup as:
>
>  
>
> exten => _9NXXXXXXXXX,1,Dial(SIP/${EXTEN:1}@pstn)

FWIW I was fighting with this today and had to make this line like:

exten => _9NXXXXXXXXX,1,Dial(SIP/${EXTEN:1}@ipaddress_of_sipura:5061)

Maybe if the host was specified in sip.conf rather than being listed as
dynamic this wouldn't be necessary.

--
Ray


I haven't confirmed this myself yet, but I will give it a try today hopefully.

By: Olle Johansson (oej) 2004-10-11 12:26:08

Ipso, please test this patch. If you dial using SIP/<peer>/<ext>, I disable the use of the contact given at registration of a peer. Pls confirm if this adds new problems or solves it. I can't test with your setup, since I haven't got a Sipura 3000...

By: Mark Spencer (markster) 2004-10-11 13:57:53

Looks sane to me.  If it applies, it's good for head and stable too i would think.

By: ipso (ipso) 2004-10-11 14:49:27

I just did a fresh checkout of the v1-0 branch and the patch applied cleanly and fixes the problem. Thanks for all your effort.

By: Olle Johansson (oej) 2004-10-11 15:05:37

Ipso, thank you for testing this!

Markster, seems like I took care of the mess I cooked up earlier :-)

/Olle

By: Olle Johansson (oej) 2004-10-11 15:06:05

And yes, this is for CVS head and stable.

By: Mark Spencer (markster) 2004-10-14 14:29:34

Fixed in CVS

By: Russell Bryant (russell) 2004-10-14 19:07:49

fixed in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:10:26.000-0600

Repository: asterisk
Revision: 4003

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r4003 | markster | 2008-01-15 15:10:26 -0600 (Tue, 15 Jan 2008) | 2 lines

Forget fullcontact when specific number is dialed (bug ASTERISK-2577)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4003

By: Digium Subversion (svnbot) 2008-01-15 15:10:31.000-0600

Repository: asterisk
Revision: 4009

U   branches/v1-0/channels/chan_sip.c

------------------------------------------------------------------------
r4009 | russell | 2008-01-15 15:10:30 -0600 (Tue, 15 Jan 2008) | 2 lines

Forget fullcontact when specific number is dialed (bug ASTERISK-2577)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4009