[Spce-user] Problem with emergency numbers - emergency_prefix/emergency_suffix not used

Marcin Kowalczyk marcin.kowalczyk at architekci.it
Wed Nov 28 04:18:02 EST 2012


Hi,

 I've enabled debuging of kamailio and I can see there, that
emergency_prefix is not added to AVP


Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dialplan.c:245]: searching 4
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dialplan.c:261]: searching 7
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dialplan.c:349]: input is emergency_112
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dp_repl.c:357]: regex operator testing
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dp_repl.c:402]: found a matching rule 0x7f9a2d62e930: pr 1, match_exp
^emergency_(.+)$
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dp_repl.c:286]: copying pvar value <> token size 24
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dp_repl.c:286]: copying pvar value <71> token size 17
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dp_repl.c:237]: copying match <112> token size 2
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: dialplan
[dialplan.c:358]: input emergency_112 with dpid 8 => output 71112

This is db entry for dialplan that is used

mysql> select * from dialplan where dpid="8"\G;
*************************** 1. row ***************************
       id: 5
     dpid: 8
       pr: 1
 match_op: 1
match_exp: ^emergency_(.+)$
match_len: 0
subst_exp: ^emergency_(.+)$
 repl_exp: $avp(s:emergency_prefix)$avp(s:caller_ac)\1
    attrs:
1 row in set (0.00 sec)

ERROR:
No query specified

mysql>


I can see that emergency prefix/suffix are fetched from DB

Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: <core>
[db_val.c:117]: converting STRING [1233]
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: <core>
[db_val.c:117]: converting STRING [emergency_prefix]
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: <core> [db_val.c:73]:
converting INT [0]
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: <core>
[db_row.c:119]: allocate 96 bytes for row values at 0x7f9a386c5ad0
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: <core>
[db_val.c:117]: converting STRING [1234]
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: <core>
[db_val.c:117]: converting STRING [emergency_suffix]
Nov 28 00:42:46 spce /usr/sbin/kamailio[9069]: DEBUG: <core> [db_val.c:73]:
converting INT [0]


Regards,
Marcin


2012/11/27 Marcin Kowalczyk <marcin.kowalczyk at architekci.it>

> Hi,
>
>  I've found a problem with NGCP CE, and I'm not sure if it's a bug or
> miss-configuration. I've followed
> http://sipwise.com/doc/2.6/spce/ar01s04.html#_emergency_number_handlingfrom doc's.
>
> I've created default rewrite rule set with emergency number, that works
> fine. I can see that it get's rewrited to emergency_112.
> Then I've created new rule set with "Outbound Rewrite Rules for Callee"
> matching ^emergency_(.+)$ pattern replacing to ${emergency_prefix}${caller_
> ac}\1 and assigned it to outgoing peer group.
>
> After emergency call is made, rewrite part works partialy - for
> emergency_prefix or emergency_suffix are not skipped: so emergency_112 is
> rewrite to ie 12112 (as caller_ac is set to 12).
> Emergency prefix or suffix are in table usr_preferences
>
> Regards,
> Marcin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20121128/dd211838/attachment.html>


More information about the Spce-user mailing list