Some endpoints will automatically hang up the call if it has not been answered after a period of time. You’d need to state exactly what happens in the scenario.
CLI > pjsip set logger on
== Setting global variable 'SIPDOMAIN' to 'Ip_Address_VoIP_Server'
<--- Transmitting SIP response (308 bytes) to UDP:Ip_Address:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP Ip_Address:5060;rport=5060;received=Ip_Address;branch=z9hG4bK1679167102
Call-ID: 998947594-5060-578@BJC.BGI.C.BE
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=1485772210
To: <sip:5000@Ip_Address_VoIP_Server>
CSeq: 91 INVITE
Server: Asterisk PBX 13.23.1
Content-Length: 0
-- Executing [5000@from-internal:1] Progress("PJSIP/100-00000063", "") in new stack
-- Executing [5000@from-internal:2] Set("PJSIP/100-00000063", "CHANNEL(Musicclass)=waiting-audio") in new stack
-- Executing [5000@from-internal:3] Dial("PJSIP/100-00000063", "PJSIP/115,120,m(waiting-audio)") in new stack
<--- Transmitting SIP response (858 bytes) to UDP:Ip_Address:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP Ip_Address:5060;rport=5060;received=Ip_Address;branch=z9hG4bK1679167102
Call-ID: 998947594-5060-578@BJC.BGI.C.BE
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=1485772210
To: <sip:5000@Ip_Address_VoIP_Server>;tag=c160b010-a1ba-47d2-b0b2-8ac3131e23cc
CSeq: 91 INVITE
Server: Asterisk PBX 13.23.1
Contact: <sip:Ip_Address_VoIP_Server:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Content-Type: application/sdp
Content-Length: 320
v=0
o=- 8000 8002 IN IP4 Ip_Address_VoIP_Server
s=Asterisk
c=IN IP4 Ip_Address_VoIP_Server
t=0 0
m=audio 17462 RTP/AVP 0 8 9 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/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 request (804 bytes) to UDP:Ip_Address:5060 --->
NOTIFY sip:100@Ip_Address:5060 SIP/2.0
Via: SIP/2.0/UDP Ip_Address_VoIP_Server:5060;rport;branch=z9hG4bKPja41d7fab-58d0-4387-986d-413b78c76748
From: <sip:100@Ip_Address_VoIP_Server>;tag=7647df20-acb9-48ff-9dd8-42937aee9786
To: <sip:100@Ip_Address_VoIP_Server>;tag=104775830
Contact: <sip:Ip_Address_VoIP_Server:5060>
Call-ID: 350966265-5060-13@BJC.BGI.C.BE
CSeq: 10344 NOTIFY
Event: dialog
Subscription-State: active;expires=948
Allow-Events: presence, dialog, message-summary, refer
Max-Forwards: 70
User-Agent: Asterisk PBX 13.23.1
Content-Type: application/dialog-info+xml
Content-Length: 228
<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="7" state="full" entity="sip:100@Ip_Address_VoIP_Server:5060">
<dialog id="100">
<state>confirmed</state>
</dialog>
</dialog-info>
-- Called PJSIP/115
-- Started music on hold, class 'waiting-audio', on channel 'PJSIP/100-00000063'
<--- Transmitting SIP request (1014 bytes) to UDP:Ip_Address:5060 --->
INVITE sip:115@Ip_Address:5060 SIP/2.0
Via: SIP/2.0/UDP Ip_Address_VoIP_Server:5060;rport;branch=z9hG4bKPjde0a321f-bc48-442e-8787-219c9f1258d4
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=2e6c6eb8-e4bf-44df-a011-7bd4de009561
To: <sip:115@Ip_Address>
Contact: <sip:asterisk@Ip_Address_VoIP_Server:5060>
Call-ID: ba5c760d-fa03-4dd3-9880-f9abf677827b
CSeq: 17647 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
Max-Forwards: 70
User-Agent: Asterisk PBX 13.23.1
Content-Type: application/sdp
Content-Length: 355
v=0
o=- 1795784790 1795784790 IN IP4 Ip_Address_VoIP_Server
s=Asterisk
c=IN IP4 Ip_Address_VoIP_Server
t=0 0
m=audio 15518 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 (858 bytes) to UDP:Ip_Address:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP Ip_Address:5060;rport=5060;received=Ip_Address;branch=z9hG4bK1679167102
Call-ID: 998947594-5060-578@BJC.BGI.C.BE
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=1485772210
To: <sip:5000@Ip_Address_VoIP_Server>;tag=c160b010-a1ba-47d2-b0b2-8ac3131e23cc
CSeq: 91 INVITE
Server: Asterisk PBX 13.23.1
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Contact: <sip:Ip_Address_VoIP_Server:5060>
Content-Type: application/sdp
Content-Length: 320
v=0
o=- 8000 8002 IN IP4 Ip_Address_VoIP_Server
s=Asterisk
c=IN IP4 Ip_Address_VoIP_Server
t=0 0
m=audio 17462 RTP/AVP 0 8 9 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/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
<--- Received SIP response (485 bytes) from UDP:Ip_Address:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP Ip_Address_VoIP_Server:5060;rport=5060;branch=z9hG4bKPjde0a321f-bc48-442e-8787-219c9f1258d4
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=2e6c6eb8-e4bf-44df-a011-7bd4de009561
To: <sip:115@Ip_Address>
Call-ID: ba5c760d-fa03-4dd3-9880-f9abf677827b
CSeq: 17647 INVITE
Supported: replaces, path, timer
User-Agent: Grandstream GXP1625 1.0.4.132
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
<--- Received SIP response (517 bytes) from UDP:Ip_Address:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP Ip_Address_VoIP_Server:5060;rport=5060;branch=z9hG4bKPja41d7fab-58d0-4387-986d-413b78c76748
From: <sip:100@Ip_Address_VoIP_Server>;tag=7647df20-acb9-48ff-9dd8-42937aee9786
To: <sip:100@Ip_Address_VoIP_Server>;tag=104775830
Call-ID: 350966265-5060-13@BJC.BGI.C.BE
CSeq: 10344 NOTIFY
Contact: <sip:100@Ip_Address:5060>
Supported: replaces, path, timer
User-Agent: Grandstream GXP2130 1.0.9.108
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
<--- Received SIP response (566 bytes) from UDP:Ip_Address:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP Ip_Address_VoIP_Server:5060;rport=5060;branch=z9hG4bKPjde0a321f-bc48-442e-8787-219c9f1258d4
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=2e6c6eb8-e4bf-44df-a011-7bd4de009561
To: <sip:115@Ip_Address>;tag=2094158472
Call-ID: ba5c760d-fa03-4dd3-9880-f9abf677827b
CSeq: 17647 INVITE
Contact: <sip:115@Ip_Address:5060>
Supported: replaces, path, timer
User-Agent: Grandstream GXP1625 1.0.4.132
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
-- PJSIP/115-00000064 is ringing
-- PJSIP/115-00000064 is ringing
After 54 seconds :
== Everyone is busy/congested at this time (1:0/0/1)
-- Stopped music on hold on PJSIP/100-0000007d
-- Executing [5000@from-internal:4] Playback("PJSIP/100-0000007d", "ivr/REPONDEUR_2_OCCUPE_PLATEAU_VENTE") in new stack
<--- Transmitting SIP response (892 bytes) to UDP:Ip_Address:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP Ip_Address:5060;rport=5060;received=Ip_Address;branch=z9hG4bK1908718675
Call-ID: 240242835-5060-603@BJC.BGI.C.BE
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=740712899
To: <sip:5000@Ip_Address_VoIP_Server>;tag=014509c1-d1e6-42ec-a9f6-aa8ec475f204
CSeq: 101 INVITE
Server: Asterisk PBX 13.23.1
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Contact: <sip:Ip_Address_VoIP_Server:5060>
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 320
v=0
o=- 8000 8002 IN IP4 Ip_Address_VoIP_Server
s=Asterisk
c=IN IP4 Ip_Address_VoIP_Server
t=0 0
m=audio 17868 RTP/AVP 0 8 9 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/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
-- <PJSIP/100-0000007d> Playing 'ivr/REPONDEUR_2_OCCUPE_PLATEAU_VENTE.ulaw' (language 'fr')
<--- Received SIP request (551 bytes) from UDP:Ip_Address:5060 --->
ACK sip:Ip_Address_VoIP_Server:5060 SIP/2.0
Via: SIP/2.0/UDP Ip_Address:5060;branch=z9hG4bK123581540;rport
From: "Arnold" <sip:100@Ip_Address_VoIP_Server>;tag=740712899
To: <sip:5000@Ip_Address_VoIP_Server>;tag=014509c1-d1e6-42ec-a9f6-aa8ec475f204
Call-ID: 240242835-5060-603@BJC.BGI.C.BE
CSeq: 101 ACK
Contact: <sip:100@Ip_Address:5060>
X-Grandstream-PBX: true
Max-Forwards: 70
Supported: replaces, path, timer
User-Agent: Grandstream GXP2130 1.0.9.108
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
I have this result after 54 seconds of read of my file. On my portal I define the “ring for” of my telephone line to 1 hour.
Now is good in Internal Call. It was my Grandstream Phone. I edit the parameter Ringing Timeout in Account > Call setting at 120 (2 minutes).
Now I’m looking at the incoming call;
Somebody know why when I have a incoming call , I do not heard my waiting-audio.wav file ?
Hi @everyone
But I have this message when I call the DID of my Ip Phone:
-- Called PJSIP/100
-- Started music on hold, class 'default', on channel 'PJSIP/belgium-voip-00000007'
[Nov 19 17:51:55] WARNING[23048][C-00000004]: translate.c:407 framein: no samples for ulawtolin
== Begin MixMonitor Recording PJSIP/belgium-voip-00000007
-- PJSIP/100-00000008 is ringing
-- PJSIP/100-00000008 is ringing
I see on this topic where he talk about a format of the file for the MOH.
What wav audio file formats are supported by Asterisk MOH?
But I convert my moh file to ulaw file with this command via sox
sox -V wav_file -r 8000 -c 1 -t ul ulaw_file
But when I call the DID, the asterisk send me the same message with the error
[Nov 19 17:51:55] WARNING[23048][C-00000004]: translate.c:407 framein: no samples for ulawtolin
@Everyone,
Need some help…someone have already solved this issue ?
You need to add wav file with proper format. After that play that file with Playback funtion on Asterisk then this issue will be resolved
Hello @ecosmobtechnologies,
I want to play the file for the music on hold on the incoming calls
In my dialplan I have these lines bellow to initialise the Music On Hold file for an incoming call:
same => n,Set(CHANNEL(Musicclass)=waiting-audio)
same => n,Dial(PJSIP/115,109,m(waiting-audio))
I convert the file with the command you can above in the last post
[root@localhost waiting-audio]# soxi waiting-audio.wav
Input File : 'waiting-audio.wav'
Channels : 1
Sample Rate : 8000
Precision : 16-bit
Duration : 00:01:49.64 = 877141 samples ~ 8223.2 CDDA sectors
File Size : 1.75M
Bit Rate : 128k
Sample Encoding: 16-bit Signed Integer PCM
[root@localhost waiting-audio]#
Do you think these parameters is correct ?
@ecosmobtechnologies, Can you tell me if this configuration is good for my Asterisk ? Because I try it on an internal call and these is work well but in the incoming calls this not work ? Did you already do that ?
I finally found the way to make my early media work well.
I just add the Answer() application before the Dial() application. And now when I have a incoming call my music on hold directory is read. And I have not any error message.