How to have a music in the same time of ringing during a call?

Are you sure that that is not normal.

You need to remember that most people here will have had no trouble in setting up custom music on hold, if they have ever tried, so they will never have debugged a working system and won’t have looked at the results of a broken one. A lot of warning messages can safely be ignored.

If you really aren’t getting the audio played, try simplifying the use of the music on hold use by using the MusicOnHold application, and getting that to work first. Then come back to your real system.

Actually I don’t hear my waiting audio with the ringing.

In my case, I want to have a waiting audio when someone call the DID of these extension 115 and 116.
This waiting audio will be play in the same time of the ringing when a commercial agent is called. I want to do this because actually In the company where I work the call-center have not a waiting audio during a second call when those last one is online with an other caller. I know is possible to do it because on some mobiles (GSM) we have the same call system now.

Hello @lordaker,

You need to use the call waiting indication tone when your extensions are busy or in a call.
This is the flag that you need to use:

r([tone]): Default: Indicate ringing to the calling party, even if the
    called party isn't actually ringing. Pass no audio to the calling party
    until the called channel has answered.
        tone - Indicate progress to calling party. Send audio 'tone' from the
        "indications.conf" tonezone currently in use.

This is usually the indications tones that you are using (it varies upon your country):

[root@pbx01 asterisk]# rasterisk -x'indication show il'
Country Indication      PlayList
=====================================
il      <ringcadence>   1000,3000
il      dial            414
il      busy            414/500,0/500
il      ring            414/1000,0/3000
il      congestion      414/250,0/250
il      callwaiting     414/100,0/100,414/100,0/100,414/600,0/3000
il      dialrecall      !414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414
il      record          1400/500,0/15000
il      info            1000/330,1400/330,1800/330,0/1000
il      stutter         !414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,414

So, you need to originate a call with the callwaiting indication tone with something similar to this:
same => n,Dial(PJSIP/${EXTEN},30,r(callwaiting))

Of course, you would have to figure it out when your extensions are busy or on a call according to the ${DIALSTATUS} parameter to issue the new call with the call waiting indication tone.

Thank you,

Daniel Friedman
Trixton LTD.

Hello @danifr

This is the syntax of my agent commercial for incoming call that I write:

exten => ${TEST_IN},1,NoOp(## Incoming Call from ${CALLERID(all)} ##)
 same => n,Verbose(Call start time: ${CDR(start)})
 same => n,Set(CDR(calldate)=${CDR(start)})
 same => n,Set(CDR(useragent)=${CALLERID(name)})
 same => n,Set(POSTE_EXT=${CALLERID(num)})
 same => n,Ringing()
 same => n,System(echo "--appel_sortant --- callerid : ${CALLERID(num)} ---- ${STRFTIME(${EPOCH},,%Y/%m/%d %H:%M:%S)} ----" >> /var/spool/asterisk/log/debug.txt)
 same => n,Set(REC_FILE_NAME=IN_${NOW}_${EXTEN}_${POSTE_EXT}.wav)
 same => n,Set(RETURNED_VALUE=${ODBC_LASTCALL(${CALLERID(num)})})
 same => n,MixMonitor(${REC_FILE_NAME},b V(1))
 same => n,Dial(PJSIP/115,15,m(waiting-audio))
 same => n,NoOp(${DIALSTATUS})
 same => n,GotoIf($["${DIALSTATUS}="BUSY"]?busy:unavail)
 same => n(busy),Dial(PJSIP/115,15,m(waiting-audio))
 same => n,Playback(ivr/REPONDEUR_2_OCCUPE_PLATEAU_VENTE)
 same => n,VoiceMail(115@default,s)
 same => n,Hangup()
 same => n(unavail),GotoIf($["${DIALSTATUS}"="CHANUNAVAIL"]?channelunavailable)
 same => n(channelunavailable),Playback(ivr/REPONDEUR_2_OCCUPE_PLATEAU_VENTE)
 same => n,VoiceMail(115@default,s)
 same => n,Hangup()

And the result in the CLI:

  == Setting global variable 'SIPDOMAIN' to 'ip address'
    -- Executing [042770677@from-external:1] NoOp("PJSIP/belgium-voip-00000078", "## Incoming Call from "Arnold" <028992018> ##") in new stack
    -- Executing [042770677@from-external:2] Verbose("PJSIP/belgium-voip-00000078", "Call start time: 2018-10-15 10:40:17") in new stack
Call start time: 2018-10-15 10:40:17
    -- Executing [042770677@from-external:3] Set("PJSIP/belgium-voip-00000078", "CDR(calldate)=2018-10-15 10:40:17") in new stack
    -- Executing [042770677@from-external:4] Set("PJSIP/belgium-voip-00000078", "CDR(useragent)=Arnold") in new stack
    -- Executing [042770677@from-external:5] Set("PJSIP/belgium-voip-00000078", "POSTE_EXT=028992018") in new stack
    -- Executing [042770677@from-external:6] Ringing("PJSIP/belgium-voip-00000078", "") in new stack
    -- Executing [042770677@from-external:7] System("PJSIP/belgium-voip-00000078", "echo "--appel_sortant --- callerid : 028992018 ---- 2018/10/15 10:40:17 ----" >> /var/spool/asterisk/log/debug.txt") in new stack
    -- PJSIP/belgium-voip-00000077 is ringing
    -- PJSIP/belgium-voip-00000077 is ringing
    -- Executing [042770677@from-external:8] Set("PJSIP/belgium-voip-00000078", "REC_FILE_NAME=IN__042770677_028992018.wav") in new stack
    -- Executing [042770677@from-external:9] Set("PJSIP/belgium-voip-00000078", "RETURNED_VALUE=116") in new stack
    -- Executing [042770677@from-external:10] MixMonitor("PJSIP/belgium-voip-00000078", "IN__042770677_028992018.wav,b V(1)") in new stack
    -- Executing [042770677@from-external:11] Dial("PJSIP/belgium-voip-00000078", "PJSIP/115,15,m(waiting-audio)") in new stack
    -- Called PJSIP/115
    -- Started music on hold, class 'waiting-audio', on channel 'PJSIP/belgium-voip-00000078'
[Oct 15 10:40:17] WARNING[3078][C-00000042]: translate.c:407 framein: no samples for ulawtolin
  == Begin MixMonitor Recording PJSIP/belgium-voip-00000078
    -- PJSIP/115-00000079 is ringing
    -- PJSIP/115-00000079 is ringing
    -- Channel PJSIP/103-00000074 left 'simple_bridge' basic-bridge <9627a799-8a06-4e07-b045-5206b542a24c>
  == Spawn extension (from-internal, 0491256345, 26) exited non-zero on 'PJSIP/103-00000074'
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording PJSIP/103-00000074
    -- Channel PJSIP/belgium-voip-00000075 left 'simple_bridge' basic-bridge <9627a799-8a06-4e07-b045-5206b542a24c>
[Oct 15 10:40:24] ERROR[1361]: cdr_odbc.c:176 odbc_log: Unable to retrieve database handle.  CDR failed.
  == Spawn extension (from-internal, 042770677, 26) exited non-zero on 'PJSIP/100-00000076'
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording PJSIP/100-00000076
    -- Stopped music on hold on PJSIP/belgium-voip-00000078
  == Spawn extension (from-external, 042770677, 11) exited non-zero on 'PJSIP/belgium-voip-00000078'
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording PJSIP/belgium-voip-00000078
[Oct 15 10:40:26] ERROR[1361]: cdr_odbc.c:176 odbc_log: Unable to retrieve database handle.  CDR failed.
[Oct 15 10:40:26] ERROR[1361]: cdr_odbc.c:176 odbc_log: Unable to retrieve database handle.  CDR failed.

As you can see my music on hold are play but I hear nothing in the telephone handset only the ringing.

    -- Executing [042770677@from-external:11] Dial("PJSIP/belgium-voip-00000078", "PJSIP/115,15,m(waiting-audio)") in new stack
    -- Called PJSIP/115
    -- Started music on hold, class 'waiting-audio', on channel 'PJSIP/belgium-voip-00000078'
[Oct 15 10:40:17] WARNING[3078][C-00000042]: translate.c:407 framein: no samples for ulawtolin

And also when the agent commercial is online with a client If a second call coming, his phone don’t ring or signal the second. So the caller is directly send to the answerer where he is invited to let a message but they do not do that or they let a message bu t we can not recall hi because we don’t the number in the historic call because the phone of agent commercial do not ring or signal the second call.

You need to ask your service provider to allow you to send early media.

As they won’t allow you to do this, you will need to call Answer explicitly. However callers won’t like this as, at least if this is France, not Canada, and also for toll calls in North America, they will be charged for listening to your wait message, even if the call fails.

In the impossible event that they are prepared to allow early media, I think you may need to call Progress() before Dial. As an academic exercise, try this from a locally connected device, so that there are no administrative blocks on early media.

Hello @lordaker,

If you wish to play an announcement to your callers without answering the call, you would have to do it with the Progress() application like @david551 mentioned.

So, try to do it like this:

exten => ${TEST_IN},1,NoOp(## Incoming Call from ${CALLERID(all)} ##)
 same => n,Verbose(Call start time: ${CDR(start)})
 same => n,Set(CDR(calldate)=${CDR(start)})
 same => n,Set(CDR(useragent)=${CALLERID(name)})
 same => n,Set(POSTE_EXT=${CALLERID(num)})
 same => n,Progress()
 same => n,Wait(1)
 same => n,System(echo "--appel_sortant --- callerid : ${CALLERID(num)} ---- ${STRFTIME(${EPOCH},,%Y/%m/%d %H:%M:%S)} ----" >> /var/spool/asterisk/log/debug.txt)
 same => n,Set(REC_FILE_NAME=IN_${NOW}_${EXTEN}_${POSTE_EXT}.wav)
 same => n,Set(RETURNED_VALUE=${ODBC_LASTCALL(${CALLERID(num)})})
 same => n,MixMonitor(${REC_FILE_NAME},b V(1))
 same => n,Dial(PJSIP/115,15,m(waiting-audio))
 same => n,NoOp(${DIALSTATUS})
 same => n,GotoIf($["${DIALSTATUS}="BUSY"]?busy:unavail)
 same => n(busy),Playback(ivr/REPONDEUR_2_OCCUPE_PLATEAU_VENTE,noanswer)
 same => n,VoiceMail(115@default,s)
 same => n,Hangup()
 same => n(unavail),GotoIf($["${DIALSTATUS}"="CHANUNAVAIL"]?channelunavailable)
 same => n(channelunavailable),Playback(ivr/REPONDEUR_2_OCCUPE_PLATEAU_VENTE,noanswer)
 same => n,VoiceMail(115@default,s)
 same => n,Hangup()

Make sure that you add these parameters to your SIP trunk (If you are using a SIP on your trunk of course) like this:

prematuremedia=no
progressinband=yes

Also, check that your handsets can accept more than one call at a time.

Thank you,

Daniel Friedman
Trixton LTD.

I use PJSIP on my trunk and in internal call I can have second call but not in the incoming call.
I use Grandstream like you can see on this topic (https://forums.grandstream.com/t/i-can-not-have-a-second-call-on-my-ip-phone/33018/12) where I talk about my problem with the second call on the phone.

Hello @lordaker,

Do you use a Vanilla Asterisk system or a distribution like the Freepbx?

Thank you,

Daniel Friedman
Trixton LTD.

I use a from scratch installation of Asterisk 13. I have been a discuss with my provider who told exactly what you said before. He will look for enable the second call on the PJSIP Trunk. But why I don’t have my waiting audio when I call the DID ?

same => n,Dial(PJSIP/115,15,m(waiting-audio))

I have just only the ringing in the telephone handset.

Any idea to resolve this message error:

    -- Started music on hold, class 'waiting-audio', on channel 'PJSIP/belgium-voip-00000419'
[Oct 15 17:29:43] WARNING[6612][C-0000023d]: translate.c:407 framein: no samples for ulawtolin
  == Begin MixMonitor Recording PJSIP/belgium-voip-00000419
    -- PJSIP/115-0000041a is ringing
    -- PJSIP/115-0000041a is ringing

If you only get it once per call, there is probably no point in resolving it.

Hi @david551 Maybe, is not possible to do it. But I think if the mobiles operators offer this service to these customers so I think it is something we can do it too. And I believe that all operators use a central telephony like Asterisk or others.

There seem to be many issues mixed up here. My last reply was telling you that the warning can be ignored.

However I’m very confused about whether you are talking about call waiting or about custom ringback tones.

For SIP phones, call waiting is generally handled in the phone.

Alright, that what I want to talking about the custom ringback tones. But not only the ringback tones, but with a music sound on it. That I why I try with the option m(classes) in the Dial() application.

Hi @danifr
I finally found the parameters to add to my pjsip trunk and extensions to allow the double call

direct_media=yes
rpid_immediate=yes

Now I can have a second call to my ip phone when I am online with a first caller. But after a time it’s do
not go to the voicemail. He cut literally.

Hello @lordaker,

Read this thread: https://community.asterisk.org/t/direct-media-with-pjsip/69896
I would revert back to the CHAN_SIP driver, otherwise, you would have to use a SIP proxy.

Thank you,

Daniel Friedman
Trixton LTD.

This is the CLI of my call test for the music on hold in the same time ringing when we call a Ip Phone:

 == Setting global variable 'SIPDOMAIN' to 'IP_Address'
<--- Transmitting SIP response (484 bytes) to UDP:188.66.8.19:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 188.66.8.19;rport=5060;received=188.66.8.19;branch=z9hG4bK88ff.8d01ac6e4ed1b5e8a829b28949f72c1f.0
Via: SIP/2.0/UDP 188.66.8.30:5060;rport=5060;received=188.66.8.30;branch=z9hG4bK0b3a43eb
Record-Route: <sip:188.66.8.19;lr>
Call-ID: 4e7f77ed295d77bf022cb43b718d5ad7@188.66.8.30:5060
From: "Arnold" <sip:028992018@188.66.8.30>;tag=as36a77adf
To: <sip:042770677@IP_Address>
CSeq: 102 INVITE
Server: Asterisk PBX 13.23.0
Content-Length:  0


    -- Executing [042770677@from-external:1] NoOp("PJSIP/belgium-voip-000004d0", "## Incoming Call from "Arnold" <028992018> ##") in new stack
    -- Executing [042770677@from-external:2] Verbose("PJSIP/belgium-voip-000004d0", "Call start time: 2018-10-17 11:34:43") in new stack
Call start time: 2018-10-17 11:34:43
    -- Executing [042770677@from-external:3] Set("PJSIP/belgium-voip-000004d0", "CDR(calldate)=2018-10-17 11:34:43") in new stack
    -- Executing [042770677@from-external:4] Set("PJSIP/belgium-voip-000004d0", "CDR(useragent)=Arnold") in new stack
    -- Executing [042770677@from-external:5] Set("PJSIP/belgium-voip-000004d0", "POSTE_EXT=028992018") in new stack
    -- Executing [042770677@from-external:6] Ringing("PJSIP/belgium-voip-000004d0", "") in new stack
    -- Executing [042770677@from-external:7] System("PJSIP/belgium-voip-000004d0", "echo "--appel_sortant --- callerid : 028992018 ---- 2018/10/17 11:34:43 ----" >> /var/spool/asterisk/log/debug.txt") in new stack
<--- Transmitting SIP response (671 bytes) to UDP:188.66.8.19:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 188.66.8.19;rport=5060;received=188.66.8.19;branch=z9hG4bK88ff.8d01ac6e4ed1b5e8a829b28949f72c1f.0
Via: SIP/2.0/UDP 188.66.8.30:5060;rport=5060;received=188.66.8.30;branch=z9hG4bK0b3a43eb
Record-Route: <sip:188.66.8.19;lr>
Call-ID: 4e7f77ed295d77bf022cb43b718d5ad7@188.66.8.30:5060
From: "Arnold" <sip:028992018@188.66.8.30>;tag=as36a77adf
To: <sip:042770677@IP_Address>;tag=77357f22-ec3d-4599-b1df-0d896bfe7b7a
CSeq: 102 INVITE
Server: Asterisk PBX 13.23.0
Contact: <sip:IP_Address:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Content-Length:  0


    -- Executing [042770677@from-external:8] Set("PJSIP/belgium-voip-000004d0", "REC_FILE_NAME=IN__042770677_028992018.wav") in new stack
<--- Received SIP response (652 bytes) from UDP:188.66.8.19:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP IP_Address:5060;received=IP_Address;rport=39748;branch=z9hG4bKPjec2f7a8d-a3e2-423d-948b-a42c5134e107
Record-Route: <sip:188.66.8.19;lr=on>
From: "Arnold" <sip:028992018@voip.belgium-voip.com>;tag=60605d21-9650-4a60-ba6b-be9fc7d73d25
To: <sip:042770677@voip.belgium-voip.com>;tag=as3a5f3ecc
Call-ID: 2e19392e-0a71-4287-baeb-435b32b577eb
CSeq: 4037 INVITE
Server: 3StarsNet VoipSwitch
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:042770677@188.66.8.30:5060>
Content-Length: 0


    -- PJSIP/belgium-voip-000004cf is ringing
    -- PJSIP/belgium-voip-000004cf is ringing
    -- Executing [042770677@from-external:9] Set("PJSIP/belgium-voip-000004d0", "RETURNED_VALUE=bel") in new stack
    -- Executing [042770677@from-external:10] MixMonitor("PJSIP/belgium-voip-000004d0", "IN__042770677_028992018.wav,b V(1)") in new stack
    -- Executing [042770677@from-external:11] Set("PJSIP/belgium-voip-000004d0", "CHANNEL(Musicclass)=waiting-audio") in new stack
    -- Executing [042770677@from-external:12] Dial("PJSIP/belgium-voip-000004d0", "PJSIP/115,20,m(waiting-audio)") in new stack
    -- Called PJSIP/115
    -- Started music on hold, class 'waiting-audio', on channel 'PJSIP/belgium-voip-000004d0'
[Oct 17 11:34:43] WARNING[16329][C-000002a5]: translate.c:407 framein: no samples for ulawtolin
<--- Transmitting SIP request (1074 bytes) to UDP:192.168.40.55:5060 --->
INVITE sip:115@192.168.40.55:5060 SIP/2.0
Via: SIP/2.0/UDP IP_Address:5060;rport;branch=z9hG4bKPj034a8beb-1716-43b0-a904-f9864e2e3f50
From: "Arnold" <sip:028992018@IP_Address>;tag=5c7b8e4d-3226-41da-bde6-4b30e51d555a
To: <sip:115@192.168.40.55>
Contact: <sip:asterisk@IP_Address:5060>
Call-ID: d0eb2058-280c-46af-9937-0a2ce39d5b1b
CSeq: 25027 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Diversion: <sip:042770677@IP_Address>;reason=unknown
Max-Forwards: 70
User-Agent: Asterisk PBX 13.23.0
Content-Type: application/sdp
Content-Length:   353

v=0
o=- 255043158 255043158 IN IP4 IP_Address
s=Asterisk
c=IN IP4 IP_Address
t=0 0
m=audio 19616 RTP/AVP 0 8 3 9 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Transmitting SIP response (1061 bytes) to UDP:188.66.8.19:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 188.66.8.19;rport=5060;received=188.66.8.19;branch=z9hG4bK88ff.8d01ac6e4ed1b5e8a829b28949f72c1f.0
Via: SIP/2.0/UDP 188.66.8.30:5060;rport=5060;received=188.66.8.30;branch=z9hG4bK0b3a43eb
Record-Route: <sip:188.66.8.19;lr>
Call-ID: 4e7f77ed295d77bf022cb43b718d5ad7@188.66.8.30:5060
From: "Arnold" <sip:028992018@188.66.8.30>;tag=as36a77adf
To: <sip:042770677@IP_Address>;tag=77357f22-ec3d-4599-b1df-0d896bfe7b7a
CSeq: 102 INVITE
Server: Asterisk PBX 13.23.0
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Contact: <sip:IP_Address:5060>
Content-Type: application/sdp
Content-Length:   347

v=0
o=- 290758 290760 IN IP4 IP_Address
s=Asterisk
c=IN IP4 IP_Address
t=0 0
m=audio 14450 RTP/AVP 0 8 3 9 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

  == Begin MixMonitor Recording PJSIP/belgium-voip-000004d0
<--- Received SIP response (491 bytes) from UDP:192.168.40.55:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP IP_Address:5060;rport=5060;branch=z9hG4bKPj034a8beb-1716-43b0-a904-f9864e2e3f50
From: "Arnold" <sip:028992018@IP_Address>;tag=5c7b8e4d-3226-41da-bde6-4b30e51d555a
To: <sip:115@192.168.40.55>
Call-ID: d0eb2058-280c-46af-9937-0a2ce39d5b1b
CSeq: 25027 INVITE
Supported: replaces, path, timer
User-Agent: Grandstream GXP2160 1.0.9.108
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Received SIP response (572 bytes) from UDP:192.168.40.55:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP IP_Address:5060;rport=5060;branch=z9hG4bKPj034a8beb-1716-43b0-a904-f9864e2e3f50
From: "Arnold" <sip:028992018@IP_Address>;tag=5c7b8e4d-3226-41da-bde6-4b30e51d555a
To: <sip:115@192.168.40.55>;tag=1740564715
Call-ID: d0eb2058-280c-46af-9937-0a2ce39d5b1b
CSeq: 25027 INVITE
Contact: <sip:115@192.168.40.55:5060>
Supported: replaces, path, timer
User-Agent: Grandstream GXP2160 1.0.9.108
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP request (828 bytes) to UDP:192.168.40.55:5060 --->
NOTIFY sip:115@192.168.40.55:5060 SIP/2.0
Via: SIP/2.0/UDP IP_Address:5060;rport;branch=z9hG4bKPj9e25d656-6f0c-493e-8b1c-ef044b17e072
From: <sip:115@IP_Address>;tag=e962f7f1-49f2-4c60-879a-eea5faead69c
To: <sip:115@IP_Address>;tag=1945958132
Contact: <sip:IP_Address:5060>
Call-ID: 672596013-5060-112@BJC.BGI.EA.FF
CSeq: 15438 NOTIFY
Event: dialog
Subscription-State: active;expires=1977
Allow-Events: presence, dialog, message-summary, refer
Max-Forwards: 70
User-Agent: Asterisk PBX 13.23.0
Content-Type: application/dialog-info+xml
Content-Length:   247

<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="24" state="full" entity="sip:115@IP_Address:5060">
 <dialog id="115" direction="recipient">
  <state>early</state>
 </dialog>
</dialog-info>

    -- PJSIP/115-000004d1 is ringing
    -- PJSIP/115-000004d1 is ringing
<--- Received SIP response (521 bytes) from UDP:192.168.40.55:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP IP_Address:5060;rport=5060;branch=z9hG4bKPj9e25d656-6f0c-493e-8b1c-ef044b17e072
From: <sip:115@IP_Address>;tag=e962f7f1-49f2-4c60-879a-eea5faead69c
To: <sip:115@IP_Address>;tag=1945958132
Call-ID: 672596013-5060-112@BJC.BGI.EA.FF
CSeq: 15438 NOTIFY
Contact: <sip:115@192.168.40.55:5060>
Supported: replaces, path, timer
User-Agent: Grandstream GXP2160 1.0.9.108
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

But this is strange I hear only the ringing tone not my audio file. The file exist and the classe too:

localhost*CLI> moh show files
Class: default
        File: /var/lib/asterisk/moh/macroform-cold_day
        File: /var/lib/asterisk/moh/macroform-robot_dity
        File: /var/lib/asterisk/moh/macroform-the_simplicity
        File: /var/lib/asterisk/moh/manolo_camp-morning_coffee
        File: /var/lib/asterisk/moh/reno_project-system
Class: waiting-audio
        File: /var/lib/asterisk/waiting-audio/waiting-audio
localhost*CLI> moh show class
No such command 'moh show class' (type 'core show help moh show class' for other possible commands)
localhost*CLI> moh show classes
Class: default
        Mode: files
        Directory: moh
Class: waiting-audio
        Mode: files
        Directory: waiting-audio
localhost*CLI>

Hello @lordaker,

do you still use the Ringing application in your dialplan?

 same => n,Ringing()

If yes, stop using it.

Thank you,

Daniel Friedman
Trixton LTD.

Yes, It was when I had test the incoming call at beginning of configuration of Asterisk. Now, I remove it. But it is always the same thing I have. My audio file is play by asterisk but I do not hear him in the handset.

CLI:

-- Called PJSIP/115
    -- Started music on hold, class 'waiting-audio', on channel 'PJSIP/belgium-voip-000005ec'
[Oct 17 12:46:52] WARNING[17442][C-00000340]: translate.c:407 framein: no samples for ulawtolin
  == Begin MixMonitor Recording PJSIP/belgium-voip-000005ec
    -- PJSIP/115-000005ed is ringing
    -- PJSIP/115-000005ed is ringing

Do you know what’s happen ? I do not understand.

Sending early media is generally restricted to network operators who can be trusted not to abuse it for free calls. It is very unlikely that your provider will permit you to use early media, so you will need to actually answer the call, which will result in the caller being charged for it.