Launch a paging/intercom call with http request?


I would like to know if there is a way to play a sound on a Grandstream intercom using the Intercom/Paging feature to have the auto answer and the sound playing and if possible without the bip before it answers.

I have an automation system and for example if it detects a specific value it could make an http request to launch the call and play a sound to alert then stops the call.

I tried manually the paging feature of freebpx it works perfectly for the auto answer but I can’t make the part where it plays a different sound depending of a custom application number used in the URL request.

I started with a php script that I already had that generates a .call file with an extension and the number to call.
It was calling a custom application that plays the sound through the use of a custom extension that was handing auto answer headers, but after a lot of attempts I understood I was doing the opposite of what I’m trying to do and the headers are probably added when calling the custom application and not the grand stream device.
The only thing happening is that it calls the Intercom and I have to manually answer.

$ content = "Channel: PJSIP/{$extension}\n » ;(the grandstream)
$content .= “Callerid: <{$callerId}>\n” ;
$content .= “WaitTime: 45\n” ;
$content .= “Context: click2intercom\n” ;
$content .= “Extension: s\n” ;
$content .= “Priority: 1\n” ;
$content .= "Set: phone={$phone}\n » ; (the custom application with the sound)

added my missing extensions_conf:

exten =&gt; s,1,Set(ALERTINFO=ring-answer)

exten =&gt; s,n,Set(CALLINFO=&lt;;;answer-after=0)

exten =&gt; s,n,Set(ALERTINFO=&lt;;;info=alert-autoanswer)

exten =&gt; s,n,Set(ALERTINFO=Intercom)

exten =&gt; s,n,Set(ALERTINFO=info=Auto Answer)

exten =&gt; s,n,Page(PJSIP/${phone})

How could I do that ?

Thank you

Try having your application just call the page extension and playback a file.

I do this all the time with cron

/usr/sbin/asterisk -rx "channel originate local/5197@from-internal application playback en/custom/buzzer-1_GJ9hRbVu"

5197 is the page extension
The buzzer* is a sound file I uploaded.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.