[Home]

Summary:ASTERISK-22866: Asterisk 12 (branches/12@402864) doesn't correctly set the fromuser parameter
Reporter:Anthony Messina (amessina)Labels:
Date Opened:2013-11-19 17:20:04.000-0600Date Closed:2013-11-19 17:23:16.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:12.0.0-beta1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Fedora 19 x86_64Attachments:( 0) irc_conversation.txt
Description:Some SIP trunk providers require the use of the "fromuser" parameter when making outbound calls.  Without the fromuser being set properly, calls fail.

With Asterisk 12 (branches/12@402864), the value for fromuser is overwritten by the value defined with CALLERID(num)=NXXNXXXXXX in the dialplan.  This is not the case in Asterisk 11 (using chan_sip).

In pjsip.conf:
{code}
[endpoint_udp_external_t](!)
type=endpoint
transport=transport-udp-external
context=default
allowsubscribe=no
direct_media=no
disallow=all
allow=ilbc
allow=gsm
allow=g722
allow=ulaw

[diamondcard](endpoint_udp_external_t)
aors=diamondcard
fromuser=12345
outbound_auth=diamondcard

[diamondcard]
type=auth
auth_type=userpass
password=<secretpassword>
username=12345

[diamondcard]
type=aor
contact=sip:46.19.58.41:5060

[diamondcard]
type=identify
endpoint=diamondcard
match=46.19.58.41
{code}

In extensions.conf:
{code}
exten => _NXXNXXXX,1,NoOp()
same => n,Set(CALLERID(num)=7735551212)
same => n,Dial(PJSIP/${EXTEN}@diamondcard,40,L(7200000:120000))
{code}

PJSIP logger shows the From header using the CALLERID(num), rather than the fromuser:
{code}
From: <sip:7735551212@50.XX.XX.XX>;tag=2e8f576f-45b3-4035-bf5e-357a524ea773
{code}

I will attach the consolidated conversation from the #asterisk IRC channel.
Comments:By: Anthony Messina (amessina) 2013-11-19 17:20:36.505-0600

IRC conversation regarding the fromuser in res_pjsip