1
Other Yate server issues / ISUP manipulations using external routing script
« on: July 29, 2015, 05:09:59 AM »
Hi,
I am trying to add ISUP data to the incoming SIP packet using external PHP module and then route it out to SIP-I provider.
When receiving an incoming call on 123123123 I need to encapsulate some ISUP data and then route the resulting SIP packet further to the provider.
my regexroute:
In this case the call is answered and hangup with 1 second length and the call is never forwardd to the provider.
In case I remove Acknowlege() then I get "Service Unavailable" with no connection attempts as well.
Can you please point me what I am doing wrong here?
Thanks,
Andrei
I am trying to add ISUP data to the incoming SIP packet using external PHP module and then route it out to SIP-I provider.
When receiving an incoming call on 123123123 I need to encapsulate some ISUP data and then route the resulting SIP packet further to the provider.
my regexroute:
Code: [Select]
^+123123123.*=external/nodata/ss7-out.php
Code: [Select]
#!/usr/bin/php -q
<?php
require_once("libyate.php");
syslog(LOG_INFO, 'YATE log');
Yate::Init();
$ev=Yate::GetEvent();
syslog(LOG_INFO, 'YATE ev is ' . $ev->name);
switch ($ev->name) {
case "call.route":
syslog(LOG_INFO, 'YATE inside call.route - never happens');
break;
case "call.execute":
syslog(LOG_INFO, 'YATE inside call.execute');
$ev->SetParam("message-prefix","isup.");
$ev->SetParam("isup.message-type","IAM");
...(list of parameters here)
$ev->retval = "sip/sip:+123123123@sip.provider.com:5060";
$ev->handled = true;
$ev->Acknowledge();
$ev = false;
break;
}
Yate::Output("PHP: bye!");
/* vi: set ts=8 sw=4 sts=4 noet: */
?>
In this case the call is answered and hangup with 1 second length and the call is never forwardd to the provider.
In case I remove Acknowlege() then I get "Service Unavailable" with no connection attempts as well.
Can you please point me what I am doing wrong here?
Thanks,
Andrei