0
votes


I'm having a problem using PJSIP, callee hears me but I got absolute silence on my side..
Few pointers:
1) Chan_SIP works perfectly.
2) PBX and phones are on the same network (no NAT).
3) The problem occurs only on outgoing calls over PRI (no problem when using IAX2 trunk).
4) The issue does not occur when I originate the call via AMI.
5) Asterisk Version - 13.4.0 Freepbx Version - 6.12.65-26 PJSIP version - 2.2 DAHDI version - 2.10.0.1
I know PJSIP is experimental but I have been able to use PJSIP over PRI before.

What could be the problem?

Update(13/07/2015):
I had to delete the previous update and a lot of lines from this log due to characters limit, but it should not matter because the the issue occurs right after dialing (no dial tone).
Called my self from extension 800 (replaced my number and the outbound cid). Here is the asterisk verbose and rtp debug log:

  -- Executing [MyNumber@from-internal:1] Macro("PJSIP/800-00000023", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/800-00000023", "TOUCH_MONITOR=1436762959.1096921") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/800-00000023", "AMPUSER=800") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/800-00000023", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/800-00000023", "1?Set(REALCALLERIDNUM=800)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/800-00000023", "AMPUSER=800") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/800-00000023", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/800-00000023", "AMPUSERCIDNAME=800") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/800-00000023", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/800-00000023", "AMPUSERCID=800") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/800-00000023", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/800-00000023", "CALLERID(all)="800" <800>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/800-00000023", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/800-00000023", "1?Set(GROUP(concurrency_limit)=800)") in new stack
    -- Executing [s@macro-user-callerid:14] GosubIf("PJSIP/800-00000023", "7?sub-ccss,s,1(from-internal,)") in new stack
    -- Executing [s@sub-ccss:1] ExecIf("PJSIP/800-00000023", "0?Return()") in new stack
    -- Executing [s@sub-ccss:2] Set("PJSIP/800-00000023", "CCSS_SETUP=TRUE") in new stack
    -- Executing [s@sub-ccss:3] GosubIf("PJSIP/800-00000023", "0?monitor_config,1(from-internal,):monitor_default,1(from-internal,)") in new stack
    -- Executing [monitor_default@sub-ccss:1] GotoIf("PJSIP/800-00000023", "0?is_exten") in new stack
    -- Executing [monitor_default@sub-ccss:2] StackPop("PJSIP/800-00000023", "") in new stack
    -- Executing [monitor_default@sub-ccss:3] Return("PJSIP/800-00000023", "FALSE") in new stack
    -- Executing [s@macro-user-callerid:15] ExecIf("PJSIP/800-00000023", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:16] GotoIf("PJSIP/800-00000023", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,30)
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/800-00000023", "CALLERID(number)=800") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/800-00000023", "CALLERID(name)=800") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/800-00000023", "CDR(cnum)=800") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/800-00000023", "CDR(cnam)=800") in new stack
    -- Executing [s@macro-user-callerid:34] Set("PJSIP/800-00000023", "CHANNEL(language)=en") in new stack
    -- Executing [MyNumber@from-internal:2] Gosub("PJSIP/800-00000023", "sub-record-check,s,1(out,MyNumber,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/800-00000023", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/800-00000023", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/800-00000023", "NOW=1436762959") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/800-00000023", "__DAY=13") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/800-00000023", "__MONTH=07") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/800-00000023", "__YEAR=2015") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/800-00000023", "__TIMESTR=20150713-074919") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/800-00000023", "__FROMEXTEN=800") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/800-00000023", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/800-00000023", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/800-00000023", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/800-00000023", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/800-00000023", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/800-00000023", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/800-00000023", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/800-00000023", "Outbound Recording Check from 800 to MyNumber") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/800-00000023", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/800-00000023", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/800-00000023", "recordcheck,1(dontcare,out,MyNumber)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/800-00000023", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/800-00000023", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/800-00000023", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/800-00000023", "") in new stack
    -- Executing [MyNumber@from-internal:3] ExecIf("PJSIP/800-00000023", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [MyNumber@from-internal:4] Set("PJSIP/800-00000023", "ROUTE_CIDSAVE="800" <800>") in new stack
    -- Executing [MyNumber@from-internal:5] Set("PJSIP/800-00000023", "MOHCLASS=default") in new stack
    -- Executing [MyNumber@from-internal:6] Set("PJSIP/800-00000023", "_NODEST=") in new stack
    -- Executing [MyNumber@from-internal:7] Macro("PJSIP/800-00000023", "dialout-trunk,2,MyNumber,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/800-00000023", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/800-00000023", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/800-00000023", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/800-00000023", "DIAL_NUMBER=MyNumber") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/800-00000023", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/800-00000023", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/800-00000023", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/800-00000023", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/800-00000023", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/800-00000023", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/800-00000023", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/800-00000023", "0?Set(REALCALLERIDNUM=800)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("PJSIP/800-00000023", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("PJSIP/800-00000023", "USEROUTCID=OutboundCID") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/800-00000023", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/800-00000023", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("PJSIP/800-00000023", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/800-00000023", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/800-00000023", "1?Set(CALLERID(all)=OutboundCID)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/800-00000023", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/800-00000023", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:18] Set("PJSIP/800-00000023", "CDR(outbound_cnum)=OutboundCID") in new stack
    -- Executing [s@macro-outbound-callerid:19] Set("PJSIP/800-00000023", "CDR(outbound_cnam)=") in new stack
[2015-07-13 07:49:19] WARNING[28882]: func_cdr.c:351 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/800-00000023", "0?sub-flp-2,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/800-00000023", "OUTNUM=MyNumber") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/800-00000023", "custom=DAHDI/r0") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/800-00000023", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/800-00000023", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/800-00000023", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/800-00000023", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/800-00000023", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/800-00000023", "1?Set(CONNECTEDLINE(name,i)=CID:OutboundCID)") in new stack
    -- Executing [s@macro-dialout-trunk:20] GotoIf("PJSIP/800-00000023", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:21] Dial("PJSIP/800-00000023", "DAHDI/r0/MyNumber,300,Tt") in new stack
    -- Requested transfer capability: 0x00 - SPEECH
    -- Called DAHDI/r0/MyNumber
    -- Moving call (DAHDI/i1/MyNumber-2d9d) from channel 27 to 25.
    -- DAHDI/i1/MyNumber-2d9d is proceeding passing it to PJSIP/800-00000023
    -- DAHDI/i1/MyNumber-2d9d is ringing
    -- DAHDI/i1/MyNumber-2d9d is making progress passing it to PJSIP/800-00000023
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039504, ts 000160, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039505, ts 000320, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039506, ts 000480, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039507, ts 000640, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039508, ts 000800, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039509, ts 000960, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039510, ts 001120, len 000160)
       > 0x7522dd98 -- Probation passed - setting RTP source address to 100.100.100.215:11794
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000000, ts 2527472030, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039511, ts 001280, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000001, ts 2527472190, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039512, ts 001440, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000002, ts 2527472350, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039513, ts 001600, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000003, ts 2527472510, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039514, ts 001760, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000004, ts 2527472670, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039515, ts 001920, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000005, ts 2527472830, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039516, ts 002080, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000006, ts 2527472990, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039517, ts 002240, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000007, ts 2527473150, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039518, ts 002400, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000008, ts 2527473310, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039519, ts 002560, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000009, ts 2527473470, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039520, ts 002720, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000010, ts 2527473630, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039521, ts 002880, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000011, ts 2527473790, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039522, ts 003040, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000012, ts 2527473950, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039523, ts 003200, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000013, ts 2527474110, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039524, ts 003360, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000014, ts 2527474270, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039525, ts 003520, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000015, ts 2527474430, len 000160)

    -- DAHDI/i1/MyNumber-2d9d answered PJSIP/800-00000023
    -- Channel PJSIP/800-00000023 joined 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
    -- Channel DAHDI/i1/MyNumber-2d9d joined 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000286, ts 2527517790, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039797, ts 047040, len 000160)
Got  RTP packet from    100.100.100.215:11794 (type 00, seq 000287, ts 2527517950, len 000160)
Sent RTP packet to      100.100.100.215:11794 (type 08, seq 039798, ts 047200, len 000160)

    -- Channel PJSIP/800-00000023 left 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
    -- Channel DAHDI/i1/MyNumber-2d9d left 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
  == Spawn extension (macro-dialout-trunk, s, 21) exited non-zero on 'PJSIP/800-00000023' in macro 'dialout-trunk'
    -- Hungup 'DAHDI/i1/MyNumber-2d9d'
  == Spawn extension (from-internal, MyNumber, 7) exited non-zero on 'PJSIP/800-00000023'
    -- Executing [h@from-internal:1] Hangup("PJSIP/800-00000023", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/800-00000023'

Thanks for all the help!

1
Hi There, are you able to paste a SIP debug, or maybe upload a .pcap file trace of your call. The scenario you are describing simply makes no sense, unless your SIP phone and Asterisk are unable to communicate fully. It would also help if you publish some information about your setup.Nir Simionovich
Hi, I will as soon as I get a chance. But I think the issue something to do with the PRI because PJSIP to ChanSIP call is fine. Thank you.user3085271
Not necessarily. As your calls are within the same LAN, there is a chance SIP to PJSIP calls have media traverse between the nodes, without passing via Asterisk at all.Nir Simionovich
Update: I registered a soft phone (Sipdroid) to the PJSIP extension and tried dialing out through the PRI trunk and everything worked. So I thought maybe the problem is the phone itself (Yealink T48g), took a new phone out of the box (Yealink T28p) with the same version and settings as I have running PJSIP for my other client (PBX is also exactly the same build) and again I got one way audio only when I originated the call via the device it self (AMI still working). This just doesn't make any sense. What logs do you think will help us understand what is the problem?user3085271
Sounds to me like a SIP trace is in order hereNir Simionovich

1 Answers

0
votes

You need nat=yes in chan_dahdi.conf under [channels].