[Spce-user] Creating subscribers through the API

Dennis van der Vliet dennis at messagebird.com
Thu Apr 16 04:27:12 EDT 2015


Hi Andrew,

+----+-----------+------+-------+----------+--------------+
| id | ip        | port | path  | sip_port | description  |
+----+-----------+------+-------+----------+--------------+
|  1 | 127.0.0.1 | 8000 | /RPC2 |     5062 | Kamailio     |
|  2 | 127.0.0.1 | 8090 | /     |     NULL | Sems         |
|  3 | 127.0.0.1 | 5062 | /     |     NULL | Kamailio-SR  |
|  4 | 127.0.0.1 | 5060 | /     |     NULL | Loadbalancer |
|  5 | 127.0.0.1 | 5582 | /     |     NULL | Prosody      |
+----+-----------+------+-------+----------+--------------+

I tested a couple of things:

1. Trigger the xml request manually after creating a domain from the API ->
this works
2. Altering the codes as in the pull request (
https://github.com/sipwise/ngcp-panel/pull/1 ) -> this works

Also if you look how a domain is created through the webinterface (
https://github.com/sipwise/ngcp-panel/blob/master/lib/NGCP/Panel/Controller/Domain.pm#L99-L147
)
I think we see that domain is created and committed to the database (line
100-137) and after that the xml request is triggered (line 147)

If you take a look at how it is done in the API this looks different (
https://github.com/sipwise/ngcp-panel/blob/master/lib/NGCP/Panel/Controller/API/Domains.pm#L156-L226).
In this case the transaction is only committed (line 226) after the xml
request is made (line 212).

So that is why I proposed the changes in the pull request (
https://github.com/sipwise/ngcp-panel/pull/1)

Dennis






Best from Amsterdam,

Dennis van der Vliet | Senior Engineer

M: +31 6 53 47 44 96
E: dennis at messagebird.com
MessageBird
LinkedIn <https://nl.linkedin.com/in/dennisvandervliet> | Twitter
<https://twitter.com/dennisvdvliet>



On 16 April 2015 at 09:53, Andrew Pogrebennyk <apogrebennyk at sipwise.com>
wrote:

>  Hi Dennis,
> what do you have in your provisioning.xmlhosts table?
>
> Andrew
>
> On 04/13/2015 05:53 PM, Dennis van der Vliet wrote:
>
>  Hi,
>
> When trying to create a subscriber through the API we encounter the
> following issue. After creating the user and entering the credentials on a
> phone, registration is not possible.
>
> Further inspection of the log files (kamailio-proxy.log) gives us the
> following info:
>
> Apr 13 15:43:54 voip02-ams3-do proxy[4389]: NOTICE: <script>: New request on proxy - M=REGISTER R=sip:sub.domain.co F=sip:username_3217 at sub.domain.co T=sip:username_3217 at sub.domain.co IP={IP_ADDRESS} (127.0.0.1:5060) ID=b75aa40b-c9aa67f3@{IP_ADDRESS}
> Apr 13 15:43:54 voip02-ams3-do proxy[4389]: WARNING: <script>: Domain not served here - R=sip:sub.domain.co ID=b75aa40b-c9aa67f3@{IP_ADDRESS}
>
> The issue is fixed once we restart kamailio-proxy manually.
>
> Is some kind of “flush” triggered after creating a subscriber through the
> webinterface that is not triggered when you do the same through the API?
>
> Best from Amsterdam,
>
> Dennis van der Vliet | Senior Engineer
>
> M: +31 6 53 47 44 96
> E: dennis at messagebird.com
> MessageBird
>
> LinkedIn | Twitter
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20150416/1a4b7114/attachment-0001.html>


More information about the Spce-user mailing list